Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Sender Email / Username

Email Service Principal is used only for sending emails. This service principal is different from LHO's Service Principal.
Before configuring the Email Service Principal please open the LHO's environment variables and set the following fields:

  • mail.oauth.tenantId

  • mail.oauth.clientId

  • mail.oauth.clientSecret

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.  

  • No labels