From 3ce6fdc63e040bcb03a62ebbed5602c3366ae7d2 Mon Sep 17 00:00:00 2001 From: Dominik Krzywiecki Date: Wed, 7 Apr 2021 18:34:58 +0100 Subject: [PATCH] Add replyTo field support (#41) Co-authored-by: Dawid Dziurla --- README.md | 2 ++ action.yml | 3 +++ main.js | 2 ++ 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 1ed34141..382f6bb7 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 recipient of the email response + reply_to: luke@example.com # Optional unsigned/invalid certificates allowance: ignore_cert: true # Optional content type (defaults to text/plain): diff --git a/action.yml b/action.yml index ce142980..44803f80 100644 --- a/action.yml +++ b/action.yml @@ -35,6 +35,9 @@ inputs: bcc: description: Blind carbon copy recipients (separated with comma) required: false + reply_to: + description: An email address that will appear on the Reply-To field + required: false ignore_cert: description: Allow unsigned/invalid certificates required: false diff --git a/main.js b/main.js index edecfd93..96242577 100644 --- a/main.js +++ b/main.js @@ -41,6 +41,7 @@ async function main() { const to = core.getInput("to", { required: true }) const cc = core.getInput("cc", { required: false }) const bcc = core.getInput("bcc", { required: false }) + const replyTo = core.getInput("reply_to", { required: false }) const contentType = core.getInput("content_type", { required: true }) const attachments = core.getInput("attachments", { required: false }) const convertMarkdown = core.getInput("convert_markdown", { required: false }) @@ -64,6 +65,7 @@ async function main() { to: to, cc: cc ? cc : undefined, bcc: bcc ? bcc : undefined, + replyTo: replyTo ? replyTo : undefined, subject: subject, text: contentType != "text/html" ? getBody(body, convertMarkdown) : undefined, html: contentType == "text/html" ? getBody(body, convertMarkdown) : undefined,