stefannovak
Hi,
Likely a noob issue, apologies! I’ve been trying to migrate from a simple SendGrid Swoosh adaptor to an SMTP one, as I’ve switched over to Zoho mail. I can’t get an email to fire, but I can get it to work using a simple Python script, so I know the account setup and auth stuff is fine, I just can’t get Phoenix working with me. I’m deep in the rabbit hole of trying things I’m finding through AI or this forum and GitHub, without knowing what I’m really doing (never configured SMTP before)
I continue to get the following error, I’m using the register account email generated by phx auth.
{:error, {:retries_exceeded, {:temporary_failure, ~c"185.230.214.164", :tls_failed}}}
I’ve got this in my dev.exs
config :swoosh, :api_client, false
config :embernotes, Embernotes.Mailer,
adapter: Swoosh.Adapters.SMTP,
relay: "smtp.zoho.eu",
username: "username",
password: "password",
port: 587,
ssl: false,
tls: :always,
auth: :always,
tls_options: [
verify: :verify_peer,
versions: ["tlsv1.3"],
cacerts: :public_key.cacerts_get(),
depth: 99
]
Those tls options are things I’ve found online. Even without them I get the same issue. I hope releasing to Prod isn’t much more difficult than getting this done on dev ![]()
From the Zoho docs
SMTP Configuration settings for Zoho Mail - TLS
Outgoing Server Settings: (Personal users with an email address as username@zohomail.com and and Free Organization users):
Outgoing Server Name: smtp.zoho.eu
Port: 587
Security Type: TLS
Require Authentication: Yes. The email address should match the email address/ email aliases of the account, for which the authentication details are provided.
Any help or direction is appreciated. Thanks!
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
ruslandoga
Do you get any warnings from Erlang before this :retries_exceeded error?
LostKobrakai
https://github.com/gen-smtp/gen_smtp/issues/298#issuecomment-1405328435
The options don‘t do well separating starttls from fully tls connections.
ruslandoga
But Zoho seems to be “normal” STARTTLS
So I would try this config:
And if it doesn’t work, maybe
middlebox_comp_mode: falsecould be added:EDIT: added
customize_hostname_checkLostKobrakai
Yeah, providers do just as badly in differenciating it seems.
stefannovak
Hey guys thanks for the responses!
No Erlang error before this error, it’s just a GenServer crashing when it occurs after trying to send an email.
EDIT: Wrong result pasted, it was the same error as in the original post.
Adding those two tls_options, server_name_indication and middlebox_comp_mode still result in the same error.
If it’s any interest, the Python setup for SMTP looked like this
I wrote that after failing to get an elixir script going, just wanted to see if any other language/framework could get it working, which made me believe it’s a Phoenix specific issue.
ruslandoga
I wonder if you could try Mua adapter, in the very least it would show the actual error message: Swoosh.Adapters.Mua — Swoosh v1.26.2 (note the extra deps)
D4no0
Highly unlikely, most probably the option for authentication you are trying to use is invalid or unsupported by the server. If python allows it, have it run in debug mode so it shows the full logs that happen when talking with the server.
ruslandoga
Oh, actually the new error is different, so one of the tls_options worked
The error now is
{:missing_requirement, ~c"185.230.214.164", :auth}and before it was{:temporary_failure, ~c"185.230.214.164", :tls_failed}, so now it’s about:usernameand:passwordoptions.stefannovak
Mua worked!
But WHY haha
stefannovak
Sorry, i didn’t mean Phoenix itself, just my configuration with it