Compare commits

..

2 Commits

Author SHA1 Message Date
silverwind ca8dbb4d4f Take the proxy from smtp_proxy instead of HTTP_PROXY (#316)
* Take the proxy from SMTP_PROXY instead of HTTP_PROXY

HTTP_PROXY says how to reach the web, and on a self-hosted runner it is
routinely set machine-wide while the mail server has to be reached
directly. Sending SMTP through it makes such a proxy refuse the
connection, and there was no way to opt out.

Read the protocol-specific SMTP_PROXY instead, and honour NO_PROXY so a
host can be exempted from it.

Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>

* Accept smtps_proxy too, and prefer the lowercase spelling

curl reads the lowercase name first and falls back to the uppercase one,
and an implicit TLS connection is configured through smtps_proxy rather
than smtp_proxy.

Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>

---------

Co-authored-by: Claude (Opus 5) <noreply@anthropic.com>
2026-09-08 16:47:01 +02:00
dependabot[bot] 8043a5ab22 build(deps): bump nodemailer from 9.1.1 to 10.0.0 (#315)
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 9.1.1 to 10.0.0.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v9.1.1...v10.0.0)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-08 08:24:21 +02:00
4 changed files with 25 additions and 9 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ Some features:
- name: Send mail
uses: dawidd6/action-send-mail@<REF>
env:
# Optional http proxy:
HTTP_PROXY: http://proxy.example.test:3128
# Optional proxy, NO_PROXY is honored too:
SMTP_PROXY: http://proxy.example.test:3128
with:
# Specify connection via URL (replaces server_address, server_port, secure,
# username and password)
+17 -1
View File
@@ -6,6 +6,22 @@ import fs from "node:fs";
import showdown from "showdown";
import path from "node:path";
// smtp_proxy or smtps_proxy, exempted by no_proxy, each preferred lowercase like curl.
function getProxy(host) {
const env = (name) => process.env[name] || process.env[name.toUpperCase()];
const proxy = env("smtp_proxy") || env("smtps_proxy");
if (!proxy) return undefined;
host = `.${host.toLowerCase()}`;
const excluded = (env("no_proxy") || "")
.split(",")
.map((entry) => entry.trim().replace(/^\./, "").toLowerCase())
.some((entry) => entry && (entry === "*" || host.endsWith(`.${entry}`)));
return excluded ? undefined : proxy;
}
function getText(textOrFile, convertMarkdown) {
let text = textOrFile;
@@ -188,7 +204,7 @@ async function main() {
: undefined,
logger: nodemailerdebug == "true" ? true : nodemailerlog,
debug: nodemailerdebug,
proxy: process.env.HTTP_PROXY,
proxy: getProxy(serverAddress),
});
const messageOptions = {
+5 -5
View File
@@ -8,7 +8,7 @@
"dependencies": {
"@actions/core": "^3.0.1",
"@actions/glob": "^0.7.0",
"nodemailer": "^9.1.1",
"nodemailer": "^10.0.0",
"showdown": "^2.1.0"
}
},
@@ -103,12 +103,12 @@
}
},
"node_modules/nodemailer": {
"version": "9.1.1",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-9.1.1.tgz",
"integrity": "sha512-izw9mVKFix6YSnC9eLgV6g1opl9DUlRio9ZNcq+Wu9Ujn2UwF+8Nl0B8nz22kEC+CTZCvinkxwJ0DeFbb6NwcQ==",
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-10.0.0.tgz",
"integrity": "sha512-wdv+hXBg0iIPIOf108FaZyTxqjQpCvQeAJt9pHHTooPy/y3vQtI9eiImM9AIVKR3e/0FeMA1oueNfBjFJcaK+Q==",
"license": "MIT-0",
"engines": {
"node": ">=6.0.0"
"node": ">=20.0.0"
}
},
"node_modules/showdown": {
+1 -1
View File
@@ -5,7 +5,7 @@
"dependencies": {
"@actions/core": "^3.0.1",
"@actions/glob": "^0.7.0",
"nodemailer": "^9.1.1",
"nodemailer": "^10.0.0",
"showdown": "^2.1.0"
}
}