mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-12-25 18:43:08 +07:00
Merge pull request #39 from dawidd6/ignore-cert
main: ignore cert if desired
This commit is contained in:
commit
0037ae15ac
@ -23,6 +23,8 @@ An action that simply sends a mail to multiple recipients.
|
||||
cc: kyloren@example.com,leia@example.com
|
||||
# Optional blind carbon copy recipients
|
||||
bcc: r2d2@example.com,hansolo@example.com
|
||||
# Optional unsigned/invalid certificates allowance:
|
||||
ignore_cert: true
|
||||
# Optional content type (defaults to text/plain):
|
||||
content_type: text/html
|
||||
# Optional converting Markdown to HTML (set content_type to text/html too):
|
||||
|
@ -35,6 +35,9 @@ inputs:
|
||||
bcc:
|
||||
description: Blind carbon copy recipients (separated with comma)
|
||||
required: false
|
||||
ignore_cert:
|
||||
description: Allow unsigned/invalid certificates
|
||||
required: false
|
||||
content_type:
|
||||
description: Content-Type HTTP header (text/html or text/plain)
|
||||
required: false
|
||||
|
4
main.js
4
main.js
@ -44,6 +44,7 @@ async function main() {
|
||||
const contentType = core.getInput("content_type", { required: true })
|
||||
const attachments = core.getInput("attachments", { required: false })
|
||||
const convertMarkdown = core.getInput("convert_markdown", { required: false })
|
||||
const ignoreCert = core.getInput("ignore_cert", { required: false })
|
||||
|
||||
const transport = nodemailer.createTransport({
|
||||
host: serverAddress,
|
||||
@ -53,6 +54,9 @@ async function main() {
|
||||
user: username,
|
||||
pass: password,
|
||||
}
|
||||
tls: ignoreCert ? {
|
||||
rejectUnauthorized: false
|
||||
} : undefined
|
||||
})
|
||||
|
||||
const info = await transport.sendMail({
|
||||
|
Loading…
Reference in New Issue
Block a user