# Office 365 SMTP settings

**URL:** <https://meta.discourse.org/t/office-365-smtp-settings/40400>\
**Category:** Self-hosting\
**Created:** [March 1, 2016, 5:35pm UTC](https://meta.discourse.org/t/office-365-smtp-settings/40400 "2016-03-01T17:35:15Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mattbatchelor](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mattbatchelor](https://meta.discourse.org/u/mattbatchelor)\
**Post date:** [March 1, 2016, 5:35pm UTC](https://meta.discourse.org/t/office-365-smtp-settings/40400/1 "2016-03-01T17:35:15Z")

</div>

Hello. Just set up my first Discourse docker. Couldn’t get SMTP to work via Office 365 and have spent the afternoon debugging. Couldn’t find a related post so thought I’d share what I did.

According to [this TechNet article](https://technet.microsoft.com/en-GB/library/dn554323(v=exchg.150).aspx) third party applications need to have an exchange licence and login set up. Note that having ‘#’ in the password may cause issues when you fill out the app.yml file.

Then you need to setup an Exchange connector via the Exchange Admin Panel, from ‘Your Organisation Email Server’ to ‘Office 365’, and restrict it to your VM’s IP (as explained in the TN article)

Then once you have the licence assigned to your ‘noreply’ email account you need the following in your app.yml:

[edit: this was incorrect. See below for the right settings]

Hope this saves someone else a rainy Tuesday afternoon of rebuilds.

---

_[View the full topic](https://meta.discourse.org/t/office-365-smtp-settings/40400)._
