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:
Spiros Kalogeropoulos
2026-02-27 12:38:27 +00:00
committed by GitHub
parent 7c60f8f904
commit ba302ba66e
4 changed files with 8 additions and 0 deletions

View File

@@ -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,