# Mail and smtp.office365.com

**URL:** <https://meta.discourse.org/t/mail-and-smtp-office365-com/136872>\
**Category:** Product Support\
**Created:** [December 23, 2019, 8:33am UTC](https://meta.discourse.org/t/mail-and-smtp-office365-com/136872 "2019-12-23T08:33:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![csmu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/csmu/32/124581_2.png) [@csmu](https://meta.discourse.org/u/csmu)\
**Post date:** [December 24, 2019, 1:17am UTC](https://meta.discourse.org/t/mail-and-smtp-office365-com/136872/2 "2019-12-24T01:17:58Z")

</div>

That log was a false positive.

The main issue was talking to [smtp.office365.com](http://smtp.office365.com)

1. Had to set the device to use a valid fully qualified domain name. Until then  
`telnet smtp.office365.com 587` failed.
2. Had to set the correct settings in the yaml file especially DISCOURSE\_SMTP\_AUTHENTICATION: login

```plaintext
  DISCOURSE_SMTP_ADDRESS: smtp.office365.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: discourse@domain
  DISCOURSE_SMTP_PASSWORD: "validPassword"
  DISCOURSE_SMTP_AUTHENTICATION: login
  DISCOURSE_SMTP_ENABLE_START_TLS: true

```

1. Had to set the SiteSetting.notification\_email

```plaintext
./launcher enter web_only
root@discourse-web-only:/var/www/discourse# rails console
[1] pry(main)> SiteSetting.notification_email = "discourse@domain"
[2] pry(main)> exit
root@discourse-web-only:/var/www/discourse# exit

```

1. Restarted the container

```plaintext
./launcher destroy web_only
./launcher start web_only

```

1. Job done!

---

_[View the full topic](https://meta.discourse.org/t/mail-and-smtp-office365-com/136872)._
