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!