Sending email failed with Net::SMTPServerBusy: 440 mail from account doesn't conform with authentication


(Frank Fang) #1

Here is my smtp settings in app.yml

  1   DISCOURSE_SMTP_ADDRESS: 'smtp.xxx.com'
  2   DISCOURSE_SMTP_PORT: 25
  3   DISCOURSE_SMTP_USER_NAME: 'no-reply@yyy.com'
  4   DISCOURSE_SMTP_PASSWORD: '***'
  5   DISCOURSE_SMTP_AUTHENTICATION: 'plain'
  6   DISCOURSE_SMTP_ENABLE_START_TLS: false 

The mail testing returned Net::SMTPServerBusy: 440 mail from account doesn't conform with authentication

But, when I test via another method:

#email.rb
require 'mail'

options = { :address              => "smtp.xxx.com",
            :port                 => 25,
            :user_name            => 'no-reply@yyy.com',
            :password             => '***',
            :authentication       => 'plain',
            :enable_starttls_auto => false  }



Mail.defaults do
  delivery_method :smtp, options
end
Mail.deliver do
  to 'zzz@zzz.com'
  from 'no-reply@yyy.com'
  subject 'testing sendmail'
  body 'testing sendmail'
end

ruby email.rb works.

So what’s the difference? Why did discourse mail testing fail?


(Frank Fang) #2

I got it, the diff is the “from” field.

Discourse > Settings > Search “email” > set “contact email” and “notification email” to no-reply@yyy.com

It waste hours of my life :frowning:


(Joshua Rosenfeld) #3

So you’re all set? Not a bug?


(Frank Fang) #4

No, not a bug. But this should be well documented.


(Jeff Atwood) #5