mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-03-05 19:31:53 +07:00
Add support for custom email headers via JSON input (#264)
* Adding custom header with JSON support * Adding headers in test workflow --------- Co-authored-by: W506810_wexinc <spiros.kalogeropoulos@wexinc.com>
This commit is contained in:
committed by
GitHub
parent
7c60f8f904
commit
ba302ba66e
2
main.js
2
main.js
@@ -115,6 +115,7 @@ async function main() {
|
||||
required: false,
|
||||
});
|
||||
const envelopeTo = core.getInput("envelope_to", { required: false });
|
||||
const headers = core.getInput("headers", { required: false });
|
||||
|
||||
// if neither to, cc or bcc is provided, throw error
|
||||
if (!to && !cc && !bcc) {
|
||||
@@ -166,6 +167,7 @@ async function main() {
|
||||
? getText(htmlBody, convertMarkdown)
|
||||
: undefined,
|
||||
priority: priority ? priority : undefined,
|
||||
headers: headers ? JSON.parse(headers) : undefined,
|
||||
attachments: attachments
|
||||
? await getAttachments(attachments)
|
||||
: undefined,
|
||||
|
||||
Reference in New Issue
Block a user