main: ignore cert if desired

This commit is contained in:
Dawid Dziurla 2021-03-26 08:42:12 +01:00
parent 9210f61cf4
commit 3082f5221c
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -44,6 +44,7 @@ async function main() {
const contentType = core.getInput("content_type", { required: true })
const attachments = core.getInput("attachments", { required: false })
const convertMarkdown = core.getInput("convert_markdown", { required: false })
const ignoreCert = core.getInput("ignore_cert", { required: false })
const transport = nodemailer.createTransport({
host: serverAddress,
@ -53,6 +54,9 @@ async function main() {
user: username,
pass: password,
}
tls: ignoreCert ? {
rejectUnauthorized: false
} : undefined
})
const info = await transport.sendMail({