Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

  1. In keyvault set email-noification-sp-client-secret to the the client secret of your deployment’s app registration.

  2. In the .env file set:

    1. EMAIL_NOTIFICATION_SP_TENANTID={{ The tenant ID from Azure for the email service that will send notifications }}

    2. EMAIL_NOTIFICATION_SP_CLIENTID={{ The client ID from Azure for the email service that will send notifications }}

    3. SPRING_MAIL_USERNAME={{ The email that notifications will be sent from. e.g. sender@mail.com }}

    4. 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:

  1. SPRING_MAIL_USERNAME={{ The email that notifications will be sent from. e.g. sender@mail.com }}

  2. 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.