# Send data via email

{% hint style="info" %}
See the changelog of this Data sink type [here](/data-sinks/mail-data-sink.md).
{% endhint %}

## Overview

Onum supports integration with email servers.

## Onum Setup

{% stepper %}
{% step %}
Log in to your Onum tenant and click **Data Sinks> New Data sink**.
{% endstep %}

{% step %}
Double-click the **Mail** Sink.
{% endstep %}

{% step %}
Enter a **Name** for the new Data Sink. Optionally, add a **Description** and some **Tags** to identify the Sink.
{% endstep %}

{% step %}
Decide whether or not to include this Data sink info in the metrics and graphs of the [**Home**](/the-workspace/home.md) area.
{% endstep %}

{% step %}
Set the **Environment** server you will send the message from.

Choose between **Start TLS** and **TLS (SSL)** in order to authenticate the connection.

{% tabs %}
{% tab title="Start TLS" %}
StartTLS upgrades a plain LDAP connection to use TLS encryption, which is different from LDAPS (LDAP over SSL), which uses port 636 and encrypts the entire session from the beginning.&#x20;

* **Host**: The StartTLS host follows patterns like `ldap.company.com`, `ds.company.com`, or `ad.company.com`
* **Port**: 389 is the standard port for LDAP with StartTLS&#x20;
* **Minimum TLS Version**: choose the minimum version from the list.

The most reliable source is your organization's LDAP/Active Directory administrator, where you can request the LDAP server hostname and port configured for StartTLS.
{% endtab %}

{% tab title="TLS (SSL)" %}
LDAPS (LDAP over SSL/TLS) encrypts the entire LDAP session from the beginning, which is different from StartTLS, which upgrades a plain LDAP connection to use TLS encryption after initial connection.

* **Host**: Often follows patterns like `ldaps.company.com`, `secure-ldap.company.com`, or the same as regular LDAP
* **Port**: 636 is the standard port for LDAPS (LDAP over SSL/TLS)
* **Minimum TLS Version**: choose the minimum version from the list.

Some organizations use the same hostname as regular LDAP but with the secure port

The most reliable source is your organization's LDAP/Active Directory administrator. Request the "LDAPS server details" specifically mentioning you need SSL/TLS connection information.
{% endtab %}
{% endtabs %}

For both, enter the authentication credentials using your Secrets (see below).
{% endstep %}

{% step %}
In the [Secrets](/administration/global-settings/organization-settings/secrets-management.md) area, **New secret** to create a new one:

* Give the secret a **Name**.
* Turn off the **Expiration date** option.
* Click **Add new value** and paste the corresponding value.
* Click **Save**.

<figure><picture><source srcset="/files/NeeWsSQzoChVxRIY76Nt" media="(prefers-color-scheme: dark)"><img src="/files/1oTccyPmgZJ1laY7IhZH" alt=""></picture><figcaption></figcaption></figure>

{% hint style="info" %}
Learn more about secrets in Onum in [this article](/administration/global-settings/organization-settings/secrets-management.md).
{% endhint %}

You can now select the created secrets in the configuration.
{% endstep %}

{% step %}
Enter the **Email address**<mark style="color:red;">**\***</mark>  that will be sending the email.
{% endstep %}

{% step %}
Specify the **Maximum requests per second**<mark style="color:red;">**\***</mark>. The minimum value is `1`, and the maximum value is `100`.
{% endstep %}

{% step %}
**Connection Attempts Configuration**

* **Number of retries**<mark style="color:red;">**\***</mark> Establish the maximum number of connection attempts. The minimum value is `1` and the maximum value is `10`.
* **Connection timeout**<mark style="color:red;">**\***</mark> Enter the number of seconds to wait before the connection is considered as timed-out.
  {% endstep %}
  {% endstepper %}

Click **Finish** when complete. Your new Data sink will appear in the **Data sinks** area list.

## Pipeline configuration <a href="#pipeline-configuration" id="pipeline-configuration"></a>

When it comes to using this Data sink in a [Pipeline](https://docs.onum.com/the-workspace/pipelines), you must configure the following output parameters. To do it, simply click the Data sink on the canvas and select **Configuration**.

### Output configuration <a href="#output-configuration" id="output-configuration"></a>

#### Email body

<table><thead><tr><th width="169.58203125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Subject</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Choose the input field that contains the mail subject.</td></tr><tr><td><strong>Message</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Choose the input field that contains the mail message.</td></tr></tbody></table>

#### Destination email addresses

Configure the fields containing where and to whom to send the data. Add as many as required.

<table><thead><tr><th width="169.58203125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>To</strong><mark style="color:red;"><strong>*</strong></mark></td><td>The recipient email.</td></tr><tr><td><strong>Cc</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Recipients to copy in.</td></tr><tr><td><strong>Bc</strong><mark style="color:red;"><strong>*</strong></mark></td><td>Recipients to blind copy in.</td></tr></tbody></table>

Click **Save** to save your configuration.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onum.com/the-workspace/data-sinks/data-sink-integrations/send-data-via-email.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
