Cannot get Email to send using Zoho mail

So just setup Discourse on a DigitalOcean droplet (1gb ram).
Using Zoho for the mail system.

I have the SMTP set in the app.yml:

TODO: The SMTP mail server used to validate new accounts and send notifications

DISCOURSE_SMTP_ADDRESS: smtp.zoho.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: noreply@essenceofzen.org
DISCOURSE_SMTP_PASSWORD: “***”
DISCOURSE_SMTP_ENABLE_START_TLS: true

I have DKIM and SPF set, and I still cannot get the “send test email” function to work and logs via sidekiq states:

Jobs::CriticalUserEmail

{“type”=>“signup”, “user_id”=>1, “email_token”=>“dd889903f2ffa1f6b8dc9f7f99ac3f19”, “current_site_id”=>“default”}

Jobs::HandledExceptionWrapper: Wrapped Net::SMTPAuthenticationError: 535 Authentication Failed

any advice?

2 Likes

Is that what the Zoho email smtp docs say to set?

“smtp docs say to set”

Well it’s hard to tell which fits what discourse requires specifically – but in terms of what is their SMTP configuration, they say this:

SMTP Configuration settings for Zoho Mail - SSL
Outgoing Server Name: smtp.zoho.com
Port: 465
Security Type: SSL

Require Authentication: Yes.

Email address should match the email address/ aliases of the account, for which the authentication details are provided.

SMTP Configuration settings for Zoho Mail - TLS
Outgoing Server Name: smtp.zoho.com
Port: 587
Security Type: TLS

Require Authentication: Yes.

Email address should match the email address/ aliases of the account, for which the authentication details are provided.

via: Zoho Mail - SMTP settings

2 Likes

Just to confirm… you provisioned a full (presumably paid) user with the username noreply@essenceofzen.org ?

Yes, though the problem has been solved!

My dev partner reminded me: “Aren’t we using 2FA with zoho?”

Yes, yes we were, but I only had it on for specific users - what I did NOT know was that if eve one user has it activated, the umbrella system won’t let any other user log in without turning on 2FA as well – so going into noreply’s account and creating a specific application password for discourse solved that issue.

Sorry for wasted topic, but hopefully this will help any other user who may have a similar system.

9 Likes

Hi Zane,

How did you create a specific application password?

Thanks!

Sorry for the late reply Bruno - for you (or any passer by readers):

Log into the zoho account, head to the account settings menu (not the mail settings, but the actual account) - at the time of posting - by clicking your account picture at the top right of the zoho site, and click “my account”. From here, you simply click “Two Factor Authentication”, and then click “Manage Application Specific Passwords”, and generate a new one with the title you give it.

And that should do it!

4 Likes

This thread came up when I was having no luck earlier this month using Zoho for our mail in a Discourse installation.

There was another MUST for us: Before going through the web-based installation steps you must set the SiteSetting.notification_email at the bottom of the app.yml. Otherwise Zoho won’t accept your mail and you would never get the activation mail or anything else.

4 Likes

This worked for me, thank you.

1 Like