Mail and smtp.office365.com

That log was a false positive.

The main issue was talking to 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
  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
./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
./launcher destroy web_only
./launcher start web_only
  1. Job done!
4 Likes