Add envelope-from and envelope-to options (#224)

* Add envelope-from and envelope-to options

* update readme
This commit is contained in:
Shane Krueger
2025-04-08 14:36:45 -04:00
committed by GitHub
parent e04abb1cc1
commit abb4c87fd6
3 changed files with 16 additions and 0 deletions

View File

@ -99,6 +99,8 @@ async function main() {
const priority = core.getInput("priority", { required: false })
const nodemailerlog = core.getInput("nodemailerlog", { required: false })
const nodemailerdebug = core.getInput("nodemailerdebug", { required: false })
const envelopeFrom = core.getInput("envelope_from", { required: false })
const envelopeTo = core.getInput("envelope_to", { required: false })
// if neither to, cc or bcc is provided, throw error
if (!to && !cc && !bcc) {
@ -140,6 +142,10 @@ async function main() {
html: htmlBody ? getText(htmlBody, convertMarkdown) : undefined,
priority: priority ? priority : undefined,
attachments: attachments ? (await getAttachments(attachments)) : undefined,
envelope: (envelopeFrom || envelopeTo) ? {
from: envelopeFrom ? envelopeFrom : undefined,
to: envelopeTo ? envelopeTo : undefined
} : undefined
});
break;
} catch (error) {