That log was a false positive.
The main issue was talking to smtp.office365.com
- Had to set the device to use a valid fully qualified domain name. Until then
telnet smtp.office365.com 587
failed. - Had to set the correct settings in the yaml file especially DISCOURSE_SMTP_AUTHENTICATION: login
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
- Had to set the SiteSetting.notification_email
./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
- Restarted the container
./launcher destroy web_only
./launcher start web_only
- Job done!