Describe the bug
Hi there - I already opened this issue in swoosh/swoosh#785 but it looks like it is related to gen_smtp, so I'll open it here as well.
I recently updated my Projects to Elixir 1.15 and OTP/26, and everything but sending emails via swoosh and gen_smtp works fine.
I am sending E-Mails via SMTP, using a local business mail provider as a relay.
Swoosh tries sending the email multiple times via gen_smtp and finally fails with the following error:
{:error,
{:retries_exceeded, {:temporary_failure, ~c"XXX.XXX.XXX.XXX", :tls_failed}}}
Here is my configuration:
config :redacted, REDACTED.Mailer,
adapter: Swoosh.Adapters.SMTP,
relay: System.get_env("SMTP_HOST") || raise("missing SMTP_HOST"),
username: System.get_env("SMTP_USERNAME") || raise("missing SMTP_USERNAME"),
password: System.get_env("SMTP_PASSWORD") || raise("missing SMTP_PASSWORD"),
tls: :always,
ssl: false,
auth: :always,
port: 587,
retries: 15
The provider only supports STARTTLS via port 587, so that's why ssl is set to false.
With Elixir 1.15 on OTP/25 it worked fine, with OTP/26 the issue appears.
I checked the Erlang documentation, but there don't seem to be any breaking changes related to TLS apart from SSL certificate validation being on by default, but that should be fine? I know this is not much to go on, but unfortunately swoosh does not give me any more information apart from :tls_failed which makes this hard to debug.
Steps to Reproduce the Bug or Issue
Send an email via Swoosh's SMTP adapter and the aforementioned config with OTP/26.
Expected behavior
The email sends without issues.
Your reproducible example
No response
Screenshots or Videos
No response
Platform
- OTP: 26.0.2
- Elixir: 1.15.2
Additional context
No response
Describe the bug
Hi there - I already opened this issue in swoosh/swoosh#785 but it looks like it is related to
gen_smtp, so I'll open it here as well.I recently updated my Projects to Elixir 1.15 and OTP/26, and everything but sending emails via swoosh and gen_smtp works fine.
I am sending E-Mails via SMTP, using a local business mail provider as a relay.
Swoosh tries sending the email multiple times via gen_smtp and finally fails with the following error:
Here is my configuration:
The provider only supports STARTTLS via port 587, so that's why
sslis set tofalse.With Elixir 1.15 on OTP/25 it worked fine, with OTP/26 the issue appears.
I checked the Erlang documentation, but there don't seem to be any breaking changes related to TLS apart from SSL certificate validation being on by default, but that should be fine? I know this is not much to go on, but unfortunately swoosh does not give me any more information apart from
:tls_failedwhich makes this hard to debug.Steps to Reproduce the Bug or Issue
Send an email via Swoosh's SMTP adapter and the aforementioned config with OTP/26.
Expected behavior
The email sends without issues.
Your reproducible example
No response
Screenshots or Videos
No response
Platform
Additional context
No response