diff --git a/README.md b/README.md index 7bff8b3f..1ed34141 100644 --- a/README.md +++ b/README.md @@ -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): diff --git a/action.yml b/action.yml index 6a316dd6..ce142980 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/main.js b/main.js index feadfce5..d36b8077 100644 --- a/main.js +++ b/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({