From 3082f5221cd063a72a3176197f441720def42b78 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Fri, 26 Mar 2021 08:42:12 +0100 Subject: [PATCH 1/3] main: ignore cert if desired --- main.js | 4 ++++ 1 file changed, 4 insertions(+) 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({ From a2f920a18bf81008e70b31d86bcd68ab2677b10c Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Fri, 2 Apr 2021 00:02:46 +0200 Subject: [PATCH 2/3] action: add ignore_cert input --- action.yml | 3 +++ 1 file changed, 3 insertions(+) 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 From 5b924828c0b1c93bca1a91fe86f0e2c393254695 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Fri, 2 Apr 2021 00:02:58 +0200 Subject: [PATCH 3/3] README: mention ignore_cert --- README.md | 2 ++ 1 file changed, 2 insertions(+) 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):