diff --git a/README.md b/README.md index 8b2278c3b..ba0ac639e 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ Some features: in_reply_to: # Optional unsigned/invalid certificates allowance: ignore_cert: true + # Optional Sets the secure SSL version v3 + ciphers_sslv3: true # Optional converting Markdown to HTML (set content_type to text/html too): convert_markdown: true # Optional attachments: diff --git a/action.yml b/action.yml index b99927379..92b75a8cf 100644 --- a/action.yml +++ b/action.yml @@ -48,6 +48,9 @@ inputs: ignore_cert: description: Allow unsigned/invalid certificates required: false + ciphers_sslv3: + description: Sets the secure SSL version v3 + required: true convert_markdown: description: Convert body from Markdown to HTML (set content_type input as text/html too) required: false diff --git a/main.js b/main.js index 999c6ccf2..5115db6d7 100644 --- a/main.js +++ b/main.js @@ -90,6 +90,7 @@ async function main() { const attachments = core.getInput("attachments", { required: false }) const convertMarkdown = core.getInput("convert_markdown", { required: false }) const ignoreCert = core.getInput("ignore_cert", { required: false }) + const ciphersSSLv3 = core.getInput("ciphers_sslv3", { required: false }) const priority = core.getInput("priority", { required: false }) if (!serverAddress) { @@ -100,7 +101,7 @@ async function main() { core.warning("Username and password not specified. You should only do this if you are using a self-hosted runner to access an on-premise mail server.") } - const transport = nodemailer.createTransport({ + const transportOptions = { host: serverAddress, auth: username && password ? { user: username, @@ -111,7 +112,13 @@ async function main() { tls: ignoreCert == "true" ? { rejectUnauthorized: false } : undefined, - }) + } + + if (ignoreCert == "true" && ciphersSSLv3 == "true") { + transportOptions.tls.ciphers = 'SSLv3' + } + + const transport = nodemailer.createTransport(transportOptions) const info = await transport.sendMail({ from: getFrom(from, username),