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>
This commit is contained in:
silverwind
2026-09-08 16:47:01 +02:00
committed by GitHub
parent 8043a5ab22
commit ca8dbb4d4f
2 changed files with 19 additions and 3 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)