Using exchange as SMTP doesn't work

Please try this configuration in your app.yml file:

DISCOURSE_SMTP_AUTHENTICATION: login
DISCOURSE_SMTP_ADDRESS: smtp.example.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: "yourusername"
DISCOURSE_SMTP_PASSWORD:  "yourpassword"
DISCOURSE_SMTP_ENABLE_START_TLS: true
DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none

And at the end of the file:

- exec: rails r "SiteSetting.notification_email='yourusername@example.com'"

Please note that the DISCOURSE_SMTP_USER_NAME and the username part of the mail in SiteSetting.notification_email is the same.

If you use for example noreply@example.com sometimes it does not work because of some security checks which are activated on the server that make sure that the username is corresponding to the user email.

Hope it could help.