> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/data-quality-self-hosted/core-concepts/alerts/working-with-the-alert-builder/configuring-alert-emails.md).

# Configuring alert emails

Email alerts let you send emails to specified recipients when an alert condition is met for a given dataset.

## Setting Up an Email Server

You can set up the SMTP server using the DQ web application. For more information about setting up an SMTP email server, go to [Configure SMTP](/data-quality-self-hosted/admin-configuration/admin-console/alerts/alert-configuration/configure-smtp.md).

## New User Requests

When you receive a new user request, the request includes the username, tenant name, and link to the instance where the request came from, for quick access.

![](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-4d8ef4164dc62ec24110fe2ccb035ffd7c897aa6%2Fdq-user-request-email.png?alt=media)

{% hint style="info" %}
If the instance comes from a standalone environment, the port number displays in the URL. If it is from another environment, such as Kubernetes, the port number is not included in the URL. See the following screenshots.
{% endhint %}

### Hostname for Standalone Environment

![](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-c86b1ee8b3023c06ecdaefeca9420680f3a69291%2Fdq-hostname-standalone-env.png?alt=media)

### Hostname for Other Environment

![](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-08b1ea397071cfaf22ed01342bd9b3d5ba717cd2%2Fdq-hostname-other-env.png?alt=media)

To use the batch name to create a consolidated list of alerts and distribution lists for a set of notifications per dataset, see [Adding dataset alerts](/data-quality-self-hosted/core-concepts/alerts/working-with-the-alert-builder/adding-dataset-alerts.md).

## Setting DQ Alerts for Datasets

You can set DQ alerts for datasets so that you are notified based on certain conditions that are triggered on the datasets. Below are some examples of what a dataset email looks like in your inbox.

{% hint style="info" %}
Ensure that the SMTP server was set up properly and that your email client didn't mark the email as spam. For more information about setting up SMTP, go to [Configure SMTP](/data-quality-self-hosted/admin-configuration/admin-console/alerts/alert-configuration/configure-smtp.md).
{% endhint %}

The following example shows a DQ alert email without links from the instance(s)/page(s).

![](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-997c69a4a2750ed87f951c9057f44a33d5125a3b%2Fdq-alert-email-without-links-permalink.png?alt=media)

The following example shows a DQ alert email with links from the instance(s)/page(s).

{% hint style="success" %}
Whenever you click the link for **Findings - Most Recent Run**, you are always directed to the most recent DQ Job run, no matter what date you click the link. The Rules and Profile pages have similar functionality.
{% endhint %}

![](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-b5f6f760649e0f5290769e69d11f11e753079afc%2Fdq-alert-email-include-links-permalink.png?alt=media)

## DQ Alerts for Failed Jobs

Another scenario is when the DQ Job fails to run or has an exception and, therefore, never gets the chance to score the data or run the alert condition. This is a failed alert that's automatically sent to the email address based on the Admin/SMTP settings defined in the To Email (Default) fields in the Admin console.

![example of an alert message due to a failed job](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-25f62bea57c6ad1f6cc2f9e216cd89b8b936a639%2Fdq-failed-alert.png?alt=media)

{% hint style="info" %}
To enable a webhook to send a global failure alert, select the **Use for Global Alerts** option on the [Webhook Alerts Configuration](/data-quality-self-hosted/admin-configuration/admin-console/alerts/alert-webhook-configuration/add-webhooks.md) page.
{% endhint %}

## Setting up the Email Server Programmatically

If you are in a notebook or pipeline, you may prefer to use the Scala/Spark API to create the Email Server.

```
    val emailServer = OwlUtils.createEmailServer("smtp-relay.sendinblue.com", 587)
    emailServer.setUsername("abc@collibra.com")
    emailServer.setPassword("abc")
    emailServer.setCurrentSet(1)
    Util.EmailServerDaoFactory.delete(emailServer)
    Util.EmailServerDaoFactory.insert(emailServer)
```

## Setting Up SMTP Alerts Without a Username or Password

Some alert settings are configurable without requiring a username or password when you set up an email server.

## Steps

{% stepper %}
{% step %}
Sign into Collibra DQ.
{% endstep %}

{% step %}
Hover your cursor over the <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-75245abf5c50ddf56f1d2d727ccaacf757d11145%2Fcogwheel-large%402x.png?alt=media" alt="" data-size="line"> icon and click **Admin Console**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The Admin Console opens.
{% endstep %}

{% step %}
Click **Configuration Settings**, then click **Application Config**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Application Configuration Settings** page opens.
{% endstep %}

{% step %}
Click **+ Add** in the upper right corner.

{% hint style="info" %}
All fields in the Add a Custom Configuration dialog box are required.
{% endhint %}
{% endstep %}

{% step %}
Enter a name and a value, where **Name** is the setting name and **Value** is its corresponding value, such as **TRUE** or **FALSE**. The following table shows the available settings and their descriptions.

| Setting name              | Default value | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mail.debug                | **TRUE**      | <p>When the value is set to <strong>TRUE</strong>, detailed logging is enabled.</p><p>When the value is set to <strong>FALSE</strong>, detailed logging is disabled.</p>                                                                                                                                                                                                                                                                                                                                                                                    |
| mail.smtp.auth            | **TRUE**      | <p>When the value is set to <strong>TRUE</strong>, the server attempts to authenticate the user using the <code>AUTH</code> command.</p><p>When the value is set to <strong>FALSE</strong>, username and password authentication are turned off.</p>                                                                                                                                                                                                                                                                                                        |
| mail.smtp.ssl.enable      | **FALSE**     | <p>When the value is set to <strong>FALSE</strong>, SSL is not used to connect to the SMTP server.</p><p>When the value is set to <strong>TRUE</strong>, SSL is used to connect.</p>                                                                                                                                                                                                                                                                                                                                                                        |
| mail.smtp.starttls.enable | **TRUE**      | <p>When the value is set to <strong>TRUE</strong> and TLS is supported by the server, this enables the use of the <code>STARTTLS</code> command to switch the connection to a TLS-protected connection before issuing any login commands.</p><p>If TLS is not supported by your mail server, the value of this setting must be set to <strong>FALSE</strong>.</p>                                                                                                                                                                                           |
| mail.smtp.ssl.trust       | **\***        | <p>If set, and a socket factory hasn't been specified, this setting enables the use of a MailSSLSocketFactory. If its value is set to <strong>*</strong>, all hosts are trusted. However, if the value is set to a whitespace-separated list of hosts, those hosts are trusted. For all other values, trust depends on the certificate the server presents.</p><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Collibra DQ does not recommend using the <strong>*</strong> default value for this property.</p></div> |

{% hint style="info" %}
These settings are preset to their default values. For example, mail.smtp.auth is preset to **TRUE**.
{% endhint %}
{% endstep %}

{% step %}
Click **Save**.
{% endstep %}

{% step %}
Repeat steps 4–6 for each setting you want to add.
{% endstep %}
{% endstepper %}
