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 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.