Smtp relay setting
SMTP Relay Settings supports 2 authentication methods:
1) Basic Authentication
2) OAuth 2.0
Configuration for SMTP Relay using Basic Authentication:
1. If your mail server is using account-based authentication, store credentials (username and password) in Global Settings - Integrations - Services Settings - Integration Key Management, create a KeyStore key with Type=Basic Authentication
2. Go to Global Settings – Communications – SMTP Relay Settings
- Select Basic Authentication as the Authentication Method
- Enter the SMTP server host
- Select the Basic Authentication key and enter the SMTP Relay details (account-based authentication), leave it empty if your mail server is using source authentication
- Enter the port to connect to on the destination server, e.g. 587, (defaults to 25 when left blank).
- Select Encryption method
1. In Global Settings - Integrations - Services Settings - Integration Key Management, create a KeyStore key with Type=OAuth 2.0
2. Enter the OAuth 2.0 authentication details in the key, these details such as the Client ID, Secret, all endpoints should be available from your SMTP provider account.
Redirect URI/URL: https://[your instance URL]/OAuthsp/smtpauth.jsp
- for Office365:
Authorization Endpoint: https://login.microsoftonline.com/[account]/oauth2/v2.0/authorize (default, this may vary depends on your account)
Token Endpoint: https://login.microsoftonline.com/[account]/oauth2/v2.0/token (default, this may vary depends on your account)
Scope: offline_access https://outlook.office365.com/.default
- for Gmail, default scope: https://mail.google.com/
Authorization Endpoint: https://accounts.google.com/o/oauth2/v2/auth (default, this may vary depends on your account)
Token Endpoint: https://oauth2.googleapis.com/token (default, this may vary depends on your account)
Scope: https://mail.google.com/
3. Go to Global Settings – Communications – SMTP Relay Settings
- Select OAuth 2.0 as the Authentication Method
- Select Provider
- Enter the SMTP server host
- Select the OAuth 2.0 key and enter the SMTP Relay details (account-based authentication), leave it empty if your mail server is using source authentication
- Enter the username of the SMTP account that will be used in the authorization process
- Enter the port to connect to on the destination server, e.g. 587, (defaults to 25 when left blank).
4. After setting is saved, click on the "Authorize SMTP" button to login and authorize your instance to use the SMTP account for SMTP Relay.
Depending on the user permission on mail provider site being used in SMPT Relay OAuth 2.0 settings, you might need to configure the “Enable Default From Address” under Global Settings – Communications – Email Options and Security – Security