Cannot get Email to send using Zoho mail


(Zane Blalock) #1

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?


(Jeff Atwood) #2

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


(Zane Blalock) #3

“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


(Allen - Watchman Monitoring) #4

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


(Zane Blalock) #5

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.


(Bruno Masoller) #6

Hi Zane,

How did you create a specific application password?

Thanks!


(Zane Blalock) #7

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!