mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2025-10-11 14:01:27 +07:00
Add cc & bcc
This commit is contained in:

committed by
Dawid Dziurla

parent
2095e6ffe3
commit
ee4d8deb11
6
main.js
6
main.js
@ -37,8 +37,10 @@ async function main() {
|
||||
const password = core.getInput("password", { required: true })
|
||||
const subject = core.getInput("subject", { required: true })
|
||||
const body = core.getInput("body", { required: true })
|
||||
const to = core.getInput("to", { required: true })
|
||||
const from = core.getInput("from", { required: true })
|
||||
const to = core.getInput("to", { required: true })
|
||||
const cc = core.getInput("cc", { required: false })
|
||||
const bcc = core.getInput("bcc", { required: false })
|
||||
const contentType = core.getInput("content_type", { required: true })
|
||||
const attachments = core.getInput("attachments", { required: false })
|
||||
const convertMarkdown = core.getInput("convert_markdown", { required: false })
|
||||
@ -58,6 +60,8 @@ async function main() {
|
||||
const info = await transport.sendMail({
|
||||
from: getFrom(from, username),
|
||||
to: to,
|
||||
cc: cc ? cc : undefined,
|
||||
bcc: bcc ? bcc : undefined,
|
||||
subject: subject,
|
||||
text: contentType != "text/html" ? getBody(body, convertMarkdown) : undefined,
|
||||
html: contentType == "text/html" ? getBody(body, convertMarkdown) : undefined,
|
||||
|
Reference in New Issue
Block a user