mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2025-07-02 05:03:15 +07:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
4226df7daa | |||
97a10a20cc | |||
9767c2af4d | |||
d6910da162 | |||
dc13c734ff |
@ -1,4 +1,4 @@
|
|||||||
# Send mail Github Action
|
# Send mail GitHub Action
|
||||||
|
|
||||||
An action that simply sends a mail to multiple recipients.
|
An action that simply sends a mail to multiple recipients.
|
||||||
|
|
||||||
@ -60,6 +60,10 @@ Some features:
|
|||||||
attachments: attachments.zip,git.diff,./dist/static/*.js
|
attachments: attachments.zip,git.diff,./dist/static/*.js
|
||||||
# Optional priority: 'high', 'normal' (default) or 'low'
|
# Optional priority: 'high', 'normal' (default) or 'low'
|
||||||
priority: low
|
priority: low
|
||||||
|
# Optional nodemailerlog: true/false
|
||||||
|
nodemailerlog: false
|
||||||
|
# Optional nodemailerdebug: true/false if true lognodem will also be set true
|
||||||
|
nodemailerdebug: false
|
||||||
```
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
@ -57,6 +57,12 @@ inputs:
|
|||||||
priority:
|
priority:
|
||||||
description: Set Priority level for the mail message to 'high', 'normal' (default) or 'low'
|
description: Set Priority level for the mail message to 'high', 'normal' (default) or 'low'
|
||||||
required: false
|
required: false
|
||||||
|
nodemailerlog:
|
||||||
|
description: Log option for nodemailer
|
||||||
|
required: false
|
||||||
|
nodemailerdebug:
|
||||||
|
description: Debug option for nodemailer
|
||||||
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: node16
|
using: node20
|
||||||
main: main.js
|
main: main.js
|
||||||
|
4
main.js
4
main.js
@ -91,6 +91,8 @@ async function main() {
|
|||||||
const convertMarkdown = core.getInput("convert_markdown", { required: false })
|
const convertMarkdown = core.getInput("convert_markdown", { required: false })
|
||||||
const ignoreCert = core.getInput("ignore_cert", { required: false })
|
const ignoreCert = core.getInput("ignore_cert", { required: false })
|
||||||
const priority = core.getInput("priority", { required: false })
|
const priority = core.getInput("priority", { required: false })
|
||||||
|
const nodemailerlog = core.getInput("nodemailerlog", { required: false })
|
||||||
|
const nodemailerdebug = core.getInput("nodemailerdebug", { required: false })
|
||||||
|
|
||||||
// if neither to, cc or bcc is provided, throw error
|
// if neither to, cc or bcc is provided, throw error
|
||||||
if (!to && !cc && !bcc) {
|
if (!to && !cc && !bcc) {
|
||||||
@ -112,6 +114,8 @@ async function main() {
|
|||||||
tls: ignoreCert == "true" ? {
|
tls: ignoreCert == "true" ? {
|
||||||
rejectUnauthorized: false
|
rejectUnauthorized: false
|
||||||
} : undefined,
|
} : undefined,
|
||||||
|
logger: nodemailerdebug == "true" ? true : nodemailerlog,
|
||||||
|
debug: nodemailerdebug,
|
||||||
})
|
})
|
||||||
|
|
||||||
const info = await transport.sendMail({
|
const info = await transport.sendMail({
|
||||||
|
28
package-lock.json
generated
28
package-lock.json
generated
@ -6,16 +6,16 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "action-send-mail",
|
"name": "action-send-mail",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.7",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/glob": "^0.4.0",
|
"@actions/glob": "^0.4.0",
|
||||||
"nodemailer": "^6.9.1",
|
"nodemailer": "^6.9.8",
|
||||||
"showdown": "^1.9.1"
|
"showdown": "^1.9.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/core": {
|
"node_modules/@actions/core": {
|
||||||
"version": "1.10.0",
|
"version": "1.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz",
|
||||||
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
|
"integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1",
|
||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
@ -171,9 +171,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/nodemailer": {
|
"node_modules/nodemailer": {
|
||||||
"version": "6.9.1",
|
"version": "6.9.8",
|
||||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.8.tgz",
|
||||||
"integrity": "sha512-qHw7dOiU5UKNnQpXktdgQ1d3OFgRAekuvbJLcdG5dnEo/GtcTHRYM7+UfJARdOFU9WUQO8OiIamgWPmiSFHYAA==",
|
"integrity": "sha512-cfrYUk16e67Ks051i4CntM9kshRYei1/o/Gi8K1d+R34OIs21xdFnW7Pt7EucmVKA0LKtqUGNcjMZ7ehjl49mQ==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
}
|
}
|
||||||
@ -341,9 +341,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": {
|
"@actions/core": {
|
||||||
"version": "1.10.0",
|
"version": "1.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz",
|
||||||
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
|
"integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1",
|
||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
@ -472,9 +472,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nodemailer": {
|
"nodemailer": {
|
||||||
"version": "6.9.1",
|
"version": "6.9.8",
|
||||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.1.tgz",
|
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.8.tgz",
|
||||||
"integrity": "sha512-qHw7dOiU5UKNnQpXktdgQ1d3OFgRAekuvbJLcdG5dnEo/GtcTHRYM7+UfJARdOFU9WUQO8OiIamgWPmiSFHYAA=="
|
"integrity": "sha512-cfrYUk16e67Ks051i4CntM9kshRYei1/o/Gi8K1d+R34OIs21xdFnW7Pt7EucmVKA0LKtqUGNcjMZ7ehjl49mQ=="
|
||||||
},
|
},
|
||||||
"p-limit": {
|
"p-limit": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"name": "action-send-mail",
|
"name": "action-send-mail",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.7",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/glob": "^0.4.0",
|
"@actions/glob": "^0.4.0",
|
||||||
"nodemailer": "^6.9.1",
|
"nodemailer": "^6.9.8",
|
||||||
"showdown": "^1.9.1"
|
"showdown": "^1.9.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user