# SMTP unrecognized authentication type with Office 365

**URL:** <https://meta.discourse.org/t/smtp-unrecognized-authentication-type-with-office-365/145830>\
**Category:** Self-hosting\
**Tags:** email\
**Created:** [27 במרץ,‏ 2020,‏ 3:34pm UTC](https://meta.discourse.org/t/smtp-unrecognized-authentication-type-with-office-365/145830 "2020-03-27T15:34:14Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![gzegzol](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gzegzol/32/191892_2.png) [@gzegzol](https://meta.discourse.org/u/gzegzol)\
**Post date:** [27 באוגוסט,‏ 2020,‏ 11:15am UTC](https://meta.discourse.org/t/smtp-unrecognized-authentication-type-with-office-365/145830/7 "2020-08-27T11:15:10Z")

</div>

I can confirm, that adding  
`smtp[:authentication]`  
to `Net::SMTP.start` call and setting  
`DISCOURSE_SMTP_AUTHENTICATION: login`  
in `app.yml` fixes the issue for email test page.

I believe, that regular emails are send via `mail` library, and setting  
`DISCOURSE_SMTP_AUTHENTICATION: login`  
in `app.yml` is enough for the library to work correctly.

Still, I believe, that `lib/tasks/emails.rake` should be patched to use `DISCOURSE_SMTP_AUTHENTICATION` setting. This would save some unnecessary debugging .

---

_[View the full topic](https://meta.discourse.org/t/smtp-unrecognized-authentication-type-with-office-365/145830)._
