> 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/alerting/heartbeat-monitoring/email-heartbeat-example.md).

# Email heartbeat example

Ping a heartbeat monitor by email when the monitored system cannot make outbound HTTPS requests but can still send mail.

Every heartbeat monitor answers to two addresses: an **Integration URL** for HTTP pings and an **Integration email**. Mail sent to that address counts as a ping, so a system behind a firewall that blocks outbound HTTPS can still report that it is alive, as long as it can reach an SMTP relay.

The subject and body are ignored — only delivery to the address matters.

## Find the address

Go to **Alerting** → **Heartbeat monitors** and click the monitor's row. The panel that opens shows **Integration email** beneath **Integration URL**. It ends in `ilertnotify.com` and is unique to that monitor; anyone who has it can keep the monitor green, so treat it like the integration key it contains.

Substitute it for `YOUR_INTEGRATION_EMAIL` in the examples below.

## Send a heartbeat email

{% tabs %}
{% tab title="mail" %}

```bash
echo "heartbeat ok" | mail -s "ilert heartbeat" YOUR_INTEGRATION_EMAIL
```

{% endtab %}

{% tab title="sendmail" %}
`sendmail` reads the recipient from the message itself, so the headers have to be there:

```bash
printf 'To: YOUR_INTEGRATION_EMAIL\nSubject: ilert heartbeat\n\nheartbeat ok\n' | sendmail -t
```

{% endtab %}

{% tab title="curl" %}
Where no mail tools are installed, curl can speak SMTP directly:

```bash
curl --url "smtp://your.smtp.server:25" \
  --mail-from "heartbeat@yourdomain.example" \
  --mail-rcpt "YOUR_INTEGRATION_EMAIL" \
  --upload-file - <<'EOF'
Subject: ilert heartbeat

heartbeat ok
EOF
```

{% endtab %}
{% endtabs %}

To ping only after a job has succeeded, chain it the same way as an HTTP ping:

```bash
run_backup.sh && echo "backup ok" | mail -s "ilert heartbeat" YOUR_INTEGRATION_EMAIL
```

## Verify it worked

Open the monitor's details panel. After the first email lands, **Status** turns **Healthy** and **Last ping received** shows the delivery time.

Email pings are slower and less certain than HTTP ones — they pass through your relay, greylisting, and queueing before ilert sees them. Set the monitor's interval with enough margin to absorb that delay, and reach for [HTTP pings](/alerting/heartbeat-monitoring/cli-heartbeat-examples.md) wherever outbound HTTPS is available.


---

# 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/alerting/heartbeat-monitoring/email-heartbeat-example.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.
