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

**URL:** <https://meta.discourse.org/t/sending-email-failed-with-net-smtpserverbusy-440-mail-from-account-doesnt-conform-with-authentication/75790>\
**Category:** Self-hosting\
**Created:** [2017年十二月10日 20:21 UTC](https://meta.discourse.org/t/sending-email-failed-with-net-smtpserverbusy-440-mail-from-account-doesnt-conform-with-authentication/75790 "2017-12-10T20:21:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FrankFang](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankfang/32/120473_2.png) [@FrankFang](https://meta.discourse.org/u/FrankFang)\
**Post date:** [2017年十二月10日 20:21 UTC](https://meta.discourse.org/t/sending-email-failed-with-net-smtpserverbusy-440-mail-from-account-doesnt-conform-with-authentication/75790/1 "2017-12-10T20:21:35Z")

</div>

Here is my smtp settings in app.yml

```plaintext
  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:

```plaintext
#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?

---

<div class="post-metadata">

**Author:** ![FrankFang](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankfang/32/120473_2.png) [@FrankFang](https://meta.discourse.org/u/FrankFang)\
**Post date:** [2017年十二月10日 20:29 UTC](https://meta.discourse.org/t/sending-email-failed-with-net-smtpserverbusy-440-mail-from-account-doesnt-conform-with-authentication/75790/2 "2017-12-10T20:29:55Z")

</div>

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

Discourse \> Settings \> Search “email” \> set “contact email” and “notification email” to [no-reply@yyy.com](mailto:no-reply@yyy.com)

It waste hours of my life ☹

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [2017年十二月10日 20:30 UTC](https://meta.discourse.org/t/sending-email-failed-with-net-smtpserverbusy-440-mail-from-account-doesnt-conform-with-authentication/75790/3 "2017-12-10T20:30:16Z")

</div>

So you’re all set? Not a bug?

---

<div class="post-metadata">

**Author:** ![FrankFang](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankfang/32/120473_2.png) [@FrankFang](https://meta.discourse.org/u/FrankFang)\
**Post date:** [2017年十二月10日 20:32 UTC](https://meta.discourse.org/t/sending-email-failed-with-net-smtpserverbusy-440-mail-from-account-doesnt-conform-with-authentication/75790/4 "2017-12-10T20:32:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2017年十二月10日 20:34 UTC](https://meta.discourse.org/t/sending-email-failed-with-net-smtpserverbusy-440-mail-from-account-doesnt-conform-with-authentication/75790/5 "2017-12-10T20:34:50Z")

</div>


