mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2024-11-10 05:51:07 +07:00
Make custom secure ports available (#51)
This commit is contained in:
parent
938c7ffae5
commit
98b61f505d
@ -30,6 +30,8 @@ Some features:
|
|||||||
to: obiwan@example.com,yoda@example.com
|
to: obiwan@example.com,yoda@example.com
|
||||||
# Required sender full name (address can be skipped):
|
# Required sender full name (address can be skipped):
|
||||||
from: Luke Skywalker # <user@example.com>
|
from: Luke Skywalker # <user@example.com>
|
||||||
|
# Optional whether this connection use TLS (default is true if server_port is 465)
|
||||||
|
secure: true
|
||||||
# Optional plain body:
|
# Optional plain body:
|
||||||
body: Build job of ${{github.repository}} completed successfully!
|
body: Build job of ${{github.repository}} completed successfully!
|
||||||
# Optional HTML body read from file:
|
# Optional HTML body read from file:
|
||||||
|
@ -26,6 +26,9 @@ inputs:
|
|||||||
from:
|
from:
|
||||||
description: Full name of mail sender (might be with an email address specified in <>)
|
description: Full name of mail sender (might be with an email address specified in <>)
|
||||||
required: true
|
required: true
|
||||||
|
secure:
|
||||||
|
description: Whether this connection use TLS (default is true if server_port is 465)
|
||||||
|
required: false
|
||||||
body:
|
body:
|
||||||
description: Body of mail message (might be a filename prefixed with file:// to read from)
|
description: Body of mail message (might be a filename prefixed with file:// to read from)
|
||||||
required: false
|
required: false
|
||||||
|
3
main.js
3
main.js
@ -38,6 +38,7 @@ async function main() {
|
|||||||
const subject = core.getInput("subject", { required: true })
|
const subject = core.getInput("subject", { required: true })
|
||||||
const from = core.getInput("from", { required: true })
|
const from = core.getInput("from", { required: true })
|
||||||
const to = core.getInput("to", { required: true })
|
const to = core.getInput("to", { required: true })
|
||||||
|
const secure = core.getInput("secure", { required: false })
|
||||||
const body = core.getInput("body", { required: false })
|
const body = core.getInput("body", { required: false })
|
||||||
const htmlBody = core.getInput("html_body", { required: false })
|
const htmlBody = core.getInput("html_body", { required: false })
|
||||||
const cc = core.getInput("cc", { required: false })
|
const cc = core.getInput("cc", { required: false })
|
||||||
@ -50,7 +51,7 @@ async function main() {
|
|||||||
const transport = nodemailer.createTransport({
|
const transport = nodemailer.createTransport({
|
||||||
host: serverAddress,
|
host: serverAddress,
|
||||||
port: serverPort,
|
port: serverPort,
|
||||||
secure: serverPort == "465",
|
secure: secure ? true : serverPort == "465",
|
||||||
auth: {
|
auth: {
|
||||||
user: username,
|
user: username,
|
||||||
pass: password,
|
pass: password,
|
||||||
|
Loading…
Reference in New Issue
Block a user