main: fix html input

This commit is contained in:
Dawid Dziurla 2020-02-29 23:10:21 +01:00
parent fa231fb236
commit 3e56585910
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -20,7 +20,7 @@ async function main() {
body = core.getInput("body", {required: true}) body = core.getInput("body", {required: true})
to = core.getInput("to", {required: true}) to = core.getInput("to", {required: true})
from = core.getInput("from", {required: true}) from = core.getInput("from", {required: true})
html = core.getInput("html") html = core.getInput("html") || "false"
transport = nodemailer.createTransport({ transport = nodemailer.createTransport({
host: server_address, host: server_address,
@ -36,8 +36,8 @@ async function main() {
from: `"${from}" <${username}>`, from: `"${from}" <${username}>`,
to: to, to: to,
subject: subject, subject: subject,
text: !html ? get_body(body) : undefined, text: html == "false" ? get_body(body) : undefined,
html: html ? get_body(body) : undefined, html: html == "true" ? get_body(body) : undefined,
}) })
console.log(info) console.log(info)