Office 365 example

Settings for Office 365.
Enable parameter "OAuth2 authorization"

SMTP server: smtp.office365.com
Port: 587
Username: email from exchange settings
Password: <leave empty>
Security: SSL/TLS
Enable parameter "Force TLS 1.2"
Enable parameter "EHLO"
OAuth tab:
Auth URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/v2.0/token
Redirect URL: http://localhost
Client ID: 8bdac3ae-09d7-4e46-863b-646077c1696c
Client Token: <leave empty>
Scope: https://outlook.office365.com/.default