# Log retention

> How long BooleanSMTP keeps email logs, and the two settings that control what gets logged and how much detail.

BooleanSMTP clears old email logs on its own, once a day. These settings, under **Settings → Logging &
Retention**, decide what's kept and for how long.

1. **Log All Active Emails** — on by default. Keeps a delivery record, visible on
   [Email Logs](/logs/), for every outgoing email. Turn it off and BooleanSMTP stops writing new log
   entries; existing ones still age out on schedule.
2. **Log mailer resolution to PHP error log** — off by default. Writes one JSON line per email to your
   server's PHP error log, showing which connection and transport were chosen. Useful while diagnosing a
   delivery problem — turn it off once you're done, since it adds logging overhead to every send.
3. **Retention Period** — how long email logs are kept before BooleanSMTP clears them automatically.
   Choose **Clear after 7 Days**, **Clear after 14 Days**, **Clear after 30 Days** (the default),
   **Clear after 90 Days**, or **Clear after 1 Year**.

![The Logging & Retention card, with Log All Active Emails and Retention Period highlighted.](../../../assets/screenshots/settings-logging.webp)

## Next steps

- [View email logs](/logs/)
- [Settings reference](/settings/)
- [Troubleshooting](/troubleshooting/)
