Zoho email authentication not working with discourse

I’ve installed discourse with AWS Lightsail with Ubuntu 18.04 LTS. The zoho email authedication is not working with discourse. At same time it’s working fine with Mailgun auhendication. Kindly help me to resolve this issue.

How do I get mail generation and related logs from the server ?

1 Like

hey @iackrishitech, welcome to meta.

can you provide us with your smtp settings in the app.yml file (remove the password)



Also I’ve tried with and without TLS.

Where do we get connection log for this ?

Kumar P

1 Like

do you have 2FA active on any of your email accounts ?

If so, did you create an app password for discourse?

1 Like

I am @iackrishitech’s lead, would like to add some info here. We do not have 2FA enabled, we are sure of that because we have another such zoho smtp setup (another zoho mail) for another web server, which is working fine so far.

I will let @iackrishitech answer on app password as he configured this server.

I find that mail jobs fail in admin panel. When I check sidekiq, I find this.

  1. Can this “Wrapped EOFError” be a cause of our failure? If so, how it succeeds in case of mail gun, but not in zoho? This happens consistently every time I try an action that would require sending a mail from discourse to my another mail

Below is the backtrace I was able to get (could not attach file as new user)


Job exception: end of file reached


/usr/local/lib/ruby/2.6.0/net/protocol.rb:225:in `rbuf_fill'
/usr/local/lib/ruby/2.6.0/net/protocol.rb:191:in `readuntil'
/usr/local/lib/ruby/2.6.0/net/protocol.rb:201:in `readline'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:950:in `recv_response'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:935:in `block in getok'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:960:in `critical'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:933:in `getok'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:919:in `quit'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:612:in `do_finish'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:521:in `ensure in start'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:521:in `start'
mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
mail-2.7.1/lib/mail/message.rb:2159:in `do_delivery'
mail-2.7.1/lib/mail/message.rb:260:in `block in deliver'
actionmailer- `block in deliver_mail'
activesupport- `block in instrument'
activesupport- `instrument'
activesupport- `instrument'
actionmailer- `deliver_mail'
mail-2.7.1/lib/mail/message.rb:260:in `deliver'
actionmailer- `block in deliver_now'
actionmailer- `handle_exceptions'
actionmailer- `deliver_now'
/var/www/discourse/lib/email/sender.rb:226:in `send'
/var/www/discourse/app/jobs/regular/user_email.rb:61:in `execute'
/var/www/discourse/app/jobs/regular/critical_user_email.rb:15:in `execute'
/var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform'
rails_multisite-2.4.0/lib/rails_multisite/connection_management.rb:76:in `with_connection'
/var/www/discourse/app/jobs/base.rb:221:in `block in perform'
/var/www/discourse/app/jobs/base.rb:217:in `each'
/var/www/discourse/app/jobs/base.rb:217:in `perform'
sidekiq-6.1.2/lib/sidekiq/processor.rb:196:in `execute_job'
sidekiq-6.1.2/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:138:in `block in invoke'
/var/www/discourse/lib/sidekiq/pausable.rb:138:in `call'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:140:in `block in invoke'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:143:in `invoke'
sidekiq-6.1.2/lib/sidekiq/processor.rb:163:in `block in process'
sidekiq-6.1.2/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_retry.rb:111:in `local'
sidekiq-6.1.2/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq.rb:38:in `block in <module:Sidekiq>'
sidekiq-6.1.2/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/processor.rb:257:in `stats'
sidekiq-6.1.2/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_logger.rb:13:in `call'
sidekiq-6.1.2/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_retry.rb:78:in `global'
sidekiq-6.1.2/lib/sidekiq/processor.rb:124:in `block in dispatch'
sidekiq-6.1.2/lib/sidekiq/logger.rb:10:in `with'
sidekiq-6.1.2/lib/sidekiq/job_logger.rb:33:in `prepare'
sidekiq-6.1.2/lib/sidekiq/processor.rb:123:in `dispatch'
sidekiq-6.1.2/lib/sidekiq/processor.rb:162:in `process'
sidekiq-6.1.2/lib/sidekiq/processor.rb:78:in `process_one'
sidekiq-6.1.2/lib/sidekiq/processor.rb:68:in `run'
sidekiq-6.1.2/lib/sidekiq/util.rb:15:in `watchdog'
sidekiq-6.1.2/lib/sidekiq/util.rb:24:in `block in safe_thread'

This is a highly blocking point for us, so kindly help. (could not add more screenshots due to new user limitation, hope this was helpful).

Thanks for the reply Gavin.

There is 2FA is not enabled for this account. However, I’ve tried by creating App password for the account and applied same on app.yml and rebuild it. Still we haven’t received the email.

Where do we find exact smtp authendication kind of logs ?
How do we check the mail (zoho) authendication is successful or not ?

What kind of things (like logs) that we have to provide to zoho support team, if they can check on their log ?

Kumar P

Hello Gavin,

I’ve did following changes.

  1. Enabled Zoho App-Password and used it on Discourse App.yml
  2. Enabled TLS as true, Port should be 587
  3. Enabled following line in App.yml and mentioned authendication email.
  • exec: rails r “SiteSetting.notification_email=‘forum@iackrishitech.com’”

Now the email functionality is working fine.

Thanks a lot for mentioning about App-Passwords at Zoho.

Thank you verymuch for the details, @Paari_Vendhan

Kumar P


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.