mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-11-22 05:25:29 +07:00
Add envelope-from and envelope-to options (#224)
* Add envelope-from and envelope-to options * update readme
This commit is contained in:
1 parent
e04abb1cc1
commit
abb4c87fd6
3 files changed
+16
No files matched your search
@@ -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