...
Info |
---|
mail.oauth.clientSecret is read from the Vault based on the key name email-notification-sp-client-secret. When the Email Service Principal's secret expires, please manually update the secret's value configured in Vault. |
How to Configure Email Notifications
Solution #1: Using OAUTH (the only solution supported by Microsoft)
The following environment variables must be set:
In keyvault set
email-noification-sp-client-secret
to the the client secret of your deployment’s app registration.In the .env file set:
EMAIL_NOTIFICATION_SP_TENANTID={{ The tenant ID from Azure for the email service that will send notifications }}
EMAIL_NOTIFICATION_SP_CLIENTID={{ The client ID from Azure for the email service that will send notifications }}
SPRING_MAIL_USERNAME={{ The email that notifications will be sent from. e.g. sender@mail.com }}
SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH_MECHANISMS=XOAUTH2
Once these environment variables are set, you can go to the app and click the SAVE button.
After OAUTH setup is complete, you can click on TEST button, and send a test email.
Solution #2: Using Basic Auth (not supported by Microsoft)
The following environment variables must be set in the .env file:
SPRING_MAIL_USERNAME={{ The email that notifications will be sent from. e.g. sender@mail.com }}
SPRING_MAIL_PASSWORD={{ The password for this email service }}
Once these environment variables are set, you can go to the app and click the SAVE button.
After OAUTH setup is complete, you can click on TEST button, and send a test email.