Skip to content

Commit

Permalink
Add replyTo field support (#41)
Browse files Browse the repository at this point in the history

Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
  • Loading branch information
krzywiecki and dawidd6 authored Apr 7, 2021
1 parent f1b626c commit 3ce6fdc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand All @@ -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,
Expand Down

0 comments on commit 3ce6fdc

Please sign in to comment.