mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2025-07-30 18:27:33 +07:00
Add envelope-from and envelope-to options (#224)
* Add envelope-from and envelope-to options * update readme
This commit is contained in:
6
main.js
6
main.js
@ -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) {
|
||||
|
Reference in New Issue
Block a user