mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-11-10 05:51:07 +07:00
main: ignore cert if desired
This commit is contained in:
parent
9210f61cf4
commit
3082f5221c
4
main.js
4
main.js
@ -44,6 +44,7 @@ async function main() {
|
|||||||
const contentType = core.getInput("content_type", { required: true })
|
const contentType = core.getInput("content_type", { required: true })
|
||||||
const attachments = core.getInput("attachments", { required: false })
|
const attachments = core.getInput("attachments", { required: false })
|
||||||
const convertMarkdown = core.getInput("convert_markdown", { required: false })
|
const convertMarkdown = core.getInput("convert_markdown", { required: false })
|
||||||
|
const ignoreCert = core.getInput("ignore_cert", { required: false })
|
||||||
|
|
||||||
const transport = nodemailer.createTransport({
|
const transport = nodemailer.createTransport({
|
||||||
host: serverAddress,
|
host: serverAddress,
|
||||||
@ -53,6 +54,9 @@ async function main() {
|
|||||||
user: username,
|
user: username,
|
||||||
pass: password,
|
pass: password,
|
||||||
}
|
}
|
||||||
|
tls: ignoreCert ? {
|
||||||
|
rejectUnauthorized: false
|
||||||
|
} : undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
const info = await transport.sendMail({
|
const info = await transport.sendMail({
|
||||||
|
Loading…
Reference in New Issue
Block a user