Enabling & Configuring Email Notification

Yandex Mail Setup

To configure Yandex Mail:

  1. Use “Yandex Help”. Go to Configuring desktop email clients → Other mail clients.

  2. Perform step 1 from the page:

    • Open the “Email clients” section in the Yandex Mail settings.

    • Select the following options: From the imap.yandex.com server via IMAP and App passwords and OAuth tokens.

    • Save the changes.

  3. Perform step 2 from the page. Generating a new password is necessary because the service requires different passwords for security purposes.

    • Go to “Account Management”.

    • Under “Passwords and authorization”, click “Enable app passwords”. Confirm the action and click “Create a new password”.

      • If you have two-factor authentication enabled, just click “Create an app password”.

    • Select the application type “Mail”.

    • Come up with a password name. For example, you may enter the name of the app you’re creating the password for. The password will be displayed in the list under this name.

    • Click “Create”. The app password will be displayed in a pop-up window. You can only see the created password once. If you enter it incorrectly and close the window, delete the current password and create a new one.

  4. Use the new password in the next step.

  5. Change the parameters in the <UNIDATA_CONF_DIR>/backend.properties file. Example:

# Email notifications
org.unidata.mdm.core.email.enabled=true
org.unidata.mdm.core.email.templates_folder=file://${unidata.conf}/templates
org.unidata.mdm.core.email.server_host=smtp.yandex.ru
org.unidata.mdm.core.email.server_port=465
org.unidata.mdm.core.email.username=<Mail>
org.unidata.mdm.core.email.password=<Generated password>
org.unidata.mdm.core.email.frontend_url=http://localhost:8080/unidata-frontend
  • Save the changes to backend.properties and reload the container without restarting the build.

  • Put the already configured backend.properties into the running container via docker-compose.

The email templates are located in the <TOMCAT_HOME>/conf/unidata/templates directory. The template processor used is Apache Velocity.

Google Mail Setup

To configure Google Mail:

  1. Log in to your Google account. Turn on two-step authentication, if you haven’t done it before:

    • Open the “Google Account” page.

    • In the navigation bar, select “Security”.

    • In the “Sign in to Google Account” section, click Two-step Authentication > Start.

    • Follow the instructions on the screen.

  2. When you are finished, the “Application Passwords” option is available.

    • If the item is not available, see Notes at the end of this article.

  3. Go to “Application Passwords” and create a password for the “Other” application by typing the name of the application. For example, Unidata. Use the resulting password in the next step.

  4. Change the parameters in the <UNIDATA_CONF_DIR>/backend.properties file. Example:

# Email notifications
org.unidata.mdm.core.email.enabled=true
org.unidata.mdm.core.email.templates_folder=file://${unidata.conf}/templates
org.unidata.mdm.core.email.server_host=smtp.gmail.com
org.unidata.mdm.core.email.server_port=465
org.unidata.mdm.core.email.username=<Mail>
org.unidata.mdm.core.email.password=<Generated password>
org.unidata.mdm.core.email.frontend_url=http://localhost:8080/unidata-frontend
  • Save the changes to backend.properties and reload the container without restarting the build.

  • Put the already configured backend.properties into the running container via docker-compose.

The email templates are located in the <TOMCAT_HOME>/conf/unidata/templates directory. The template processor used is Apache Velocity.

Notes:

The “Application Passwords” item may not be available if:

  • Two-step authentication is not configured for your account;

  • Two-step authentication is only set up for electronic keys;

  • You are logged into a work, training, or other corporate account;

  • Additional security is enabled on your account.

Other email services can be configured. To configure it, specify another host in the parameter unidata.activiti.task.mailServerHost=smtp.yandex.ru, specify the mail password in unidata.activiti.task.mailServerPassword, and perform service settings similar to steps 2 and 3 from the Yandex Mail setup manual.