# Email Heartbeat Example

Besides HTTP/CLI pings, ilert heartbeats can also be triggered by email. Each heartbeat monitor provides a unique Integration Email address.

If your system sends an email to this address within the configured interval, the heartbeat stays green. If no email arrives in time, the monitor becomes overdue and triggers an alert.

This option is intended for environments where outgoing HTTP(S) requests are not possible (for example due to firewall or network restrictions), but the monitored system can still send emails via SMTP.

To use email heartbeats, simply send an email periodically to the Integration Email address of the heartbeat monitor. The subject and body are optional — only successful delivery matters.

#### Example: send a heartbeat email with mail

```shellscript
echo "heartbeat ok" | mail -s "ilert heartbeat" <INTEGRATION_EMAIL>
```

#### Example: send with sendmail

```shellscript
printf "Subject: ilert heartbeat\n\nheartbeat ok\n" | sendmail <INTEGRATION_EMAIL>
```

#### Example: send with curl to SMTP server (if mail tools are not installed)

```shellscript
curl --url "smtp://your.smtp.server:25" \
  --mail-from "heartbeat@yourdomain.com" \
  --mail-rcpt "<INTEGRATION_EMAIL>" \
  --upload-file - <<EOF
Subject: ilert heartbeat

heartbeat ok
EOF
```


---

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