Directory / plugin

Neuedaten Privacy Mail Log

v1.0.0 · by bastianschwabe

Mail logging with anonymization and GDPR-friendly retention. Log every email your site sends — and decide how long personal data is kept.

About this plugin

Privacy Mail Log records every email sent through wp_mail(): recipients, subject, body, attachments (file names only), and whether the send succeeded or failed. Unlike most mail loggers, it treats the log itself as what it is — a growing collection of personal data — and gives you the tools to keep it small.

You decide per field whether the recipient name, the recipient email address, the subject and the body are anonymized: never, after a retention period, or immediately when the entry is written. Immediately anonymized data never reaches the database at all. A second retention stage deletes old entries completely. Anonymization is irreversible.

Features

  • Logs every email sent through wp_mail(), including failed sends with their error message
  • Log view with search, status filter and bulk delete; HTML emails are rendered in a sandbox that blocks scripts and forms
  • Per-field anonymization: recipient name, recipient email address, subject and body — each set to never, after the retention period, or immediately
  • Metadata-only mode: set the body to “Immediately” and the message content is never stored
  • Three replacement styles for email addresses: a plain placeholder, a stable hash (still countable and searchable), or keeping just the domain
  • Two-stage retention via WP-Cron: anonymize after a number of days, delete completely after a longer period
  • Integrates with the WordPress privacy tools: personal data exports include matching log entries, and erasure requests anonymize them
  • Test email screen to verify that logging works on your site
  • Attachments are stored as file names only, never as files
  • No dependencies, no external requests, no tracking

Privacy

The log stores personal data: email addresses, names, subjects and message bodies of the emails your site sends. What is stored and for how long is under your control:

  • Fields set to “Immediately” are anonymized before the entry is written, so that data never reaches the database.
  • The retention cron anonymizes entries after a configurable number of days (default 30) and deletes them completely after a longer period (default 90 days).
  • Personal data export requests (Tools Export Personal Data) include matching log entries; erasure requests (Tools Erase Personal Data) irreversibly anonymize them while the send record itself remains.
  • Attachments are recorded as file names only. The plugin makes no external requests.

Privacy Mail Log is a tool, not a compliance guarantee. Whether your use of it complies with the GDPR/DSGVO or any other regulation depends on your configuration, your retention periods and your processes as the site operator. This is not legal advice.

For developers

  • neuedaten_pml_logged — action fired after an email has been written to the log, with the entry id and the stored values
  • neuedaten_pml_settings — filter the resolved plugin settings
  • neuedaten_pml_capability — filter the capability required for all plugin screens (default manage_options)
  • neuedaten_pml_retention_batch_size — filter how many entries each retention stage processes per cron run (default 500)

Plugin tags