# The event log

> Every state an e-mail goes through, and how to search them.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://mail.docs.sypnia.com/events/event-log/

For agents: Mail events: queued, scheduled, sent, delivered, delivery_delayed (SES retries up to 12 h), bounced (hard/soft), complained, opened, clicked, rejected, canceled; mail events filters --to --since --tag --type; open tracking is unreliable (proxies, blocked images) — trend only; open/click tracking off by default; bodies kept for plan retention, events longer without body.

| Event              | Means                                                                                              |
| ------------------ | -------------------------------------------------------------------------------------------------- |
| `queued`           | accepted and waiting in the project's queue                                                        |
| `scheduled`        | waiting for its `scheduledAt`                                                                      |
| `sent`             | handed to Amazon SES                                                                               |
| `delivered`        | the recipient's server accepted it                                                                 |
| `delivery_delayed` | the recipient's server asked to retry later; SES keeps trying for up to 12 hours                   |
| `bounced`          | it could not be delivered: `hard` (the address does not exist) or `soft` (full mailbox, temporary) |
| `complained`       | the recipient marked it as spam                                                                    |
| `opened`           | the recipient opened it (only with open tracking, and not exact: see below)                        |
| `clicked`          | the recipient clicked a link (only with click tracking)                                            |
| `rejected`         | Mail or SES refused to send it (for example, a virus in an attachment)                             |
| `canceled`         | a scheduled e-mail was canceled                                                                    |

```bash
npx @sypnia/mail events --to ana@example.com --since 7d
npx @sypnia/mail events --tag kind=order-ready --type bounced
```

## About opens

Open tracking adds a tiny image; many mail apps load images through a proxy or block them, so `opened` can appear without the person reading and be missing when they did. Treat it as a trend, not a fact. Open and click tracking are **off** by default and turned on per project or per send.

## Retention

The body of each e-mail is kept for the plan's retention, for support and re-sending; events and metadata are kept longer, without the body.
