> For the complete documentation index, see [llms.txt](https://docs.ilert.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ilert.com/integrations/outbound-integrations/email.md).

# Email Outbound Integration

The ilert email outbound integration sends emails for alerts and alert updates to any address, e.g. to a group address or to people outside of ilert.

An email alert action sends an email whenever one of the alert events you selected happens, or on demand when you run it manually from an alert. Subject, body and every target field (**Send to**, **CC**, **BCC**) support template variables, so both the content and the recipients can come from the alert itself.

## In ilert: Create a new email alert action <a href="#create" id="create"></a>

1. In the sidebar, go to **Alerting** → **Alert sources** and open the alert source the alert action belongs to, then switch to its **Alert actions** tab.
2. Now click on **Create new alert action**.
3. Search for **Email** in the alert actions wizard and select our email integration.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2FIWuPJ2ZBFLUmsZRMwIFC%2Filert-7.png?alt=media&amp;token=4c942223-7aa2-41d2-a694-f34ce701ac09" alt="" width="563"><figcaption></figcaption></figure>

4. Enter a **Name** and proceed to the next step.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fxfa8gBx9VXF3XSAt2ei3%2Filert-8.png?alt=media&amp;token=93f1f241-97c3-4f40-a478-b3c2957e398e" alt="" width="563"><figcaption></figcaption></figure>

5. Choose some alert event filters for your alert action and click on **Next**. Pick **Manually via alert action** instead if you would rather run it from the alert detail view yourself.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fg2LVjlMdFmomW5xGEnwI%2Filert-9.png?alt=media&amp;token=08c16b7d-974c-4b91-8427-1cc25145bf9e" alt="" width="563"><figcaption></figcaption></figure>

6. Fill in the email itself and click on **Done** to finish the setup:

* **Send to** — the recipients. Required.
* **CC** and **BCC** — optional carbon copy and blind carbon copy recipients.
* **Subject** and **Body** — prefilled with a default template you can adjust.

## Recipients <a href="#recipients" id="recipients"></a>

Each of the three target fields takes any number of entries. An entry is either a plain address, or a template that is resolved when the email is sent:

| Entry                                | Sends to                                                             |
| ------------------------------------ | -------------------------------------------------------------------- |
| `alerts@example.com`                 | that address                                                         |
| `{{ alert.customDetails.email }}`    | the address in the `email` field of the event that created the alert |
| `{{ responderEmails }}`              | everyone currently responding to the alert                           |
| `support+{{ alert.id }}@example.com` | a per-alert address, e.g. to thread replies in a ticket system       |

A template that resolves into a comma separated list becomes one recipient per entry, and an address listed twice is only used once.

{% hint style="info" %}
Because a template is only resolved once an alert arrives, ilert cannot tell while you are saving whether it will produce a usable address. Anything that does not resolve into a valid address is skipped, and the alert action fails when nothing is left to send to. You can see what happened in the alert action's log.
{% endhint %}

Recipients that bounced repeatedly are put on a suppression list and are skipped as well, so a dead mailbox cannot harm the sending reputation of the addresses that still work.

## Subject and body <a href="#templates" id="templates"></a>

Both fields are prefilled with a default template. Clicking into a template field opens the template variables overlay, giving you quick access to all supported fields.

Just like the ICL (conditional execution) variable access, your template has access to the full alert object and all its subfields. This also grants you access to the original event payload, e.g. `{{ alert.customDetails.whatever.name }}`. It is possible to use [If/Else and Loop blocks supported by ITL](https://docs.ilert.com/developer-docs/itl-ilert-template-language); ITL functions are not allowed in alert action templates.

The full variable list is documented on the [webhook page](/integrations/outbound-integrations/webhook.md#template-variables-explained), it is the same for every alert action.

## Run an email alert action manually <a href="#manual" id="manual"></a>

If you chose **Manually via alert action**, the alert action shows up in the action menu of every alert of the selected alert sources, and sends its email when you run it from there.

## Related articles

{% content-ref url="/pages/-M9OVQnHrMFRxhJA0vMR" %}
[Email Inbound Integration](/integrations/inbound-integrations/email.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ilert.com/integrations/outbound-integrations/email.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
