BACK TO DIRECTORY

MailSentra: Email Logging & Diagnostics

by Macro Espias

0.0
(0 ratings)

MailSentra logs WordPress email attempts and records the status, recipient, subject, trigger, caller, call stack, and source details for each message. It provides email statistics, weekly and monthly reports, source-based diagnostics, search and filtering, CSV export, and configurable retention.

Email body, headers, attachment paths, and request IP addresses can be logged when their individual settings are enabled. Body, header, attachment, and IP logging are disabled by default for new installations; enable only the fields needed for troubleshooting. MailSentra stores logged data in the site database and does not send it to an external service.

A “Sent” status means WordPress or PHPMailer reported a successful send operation. It does not confirm final inbox delivery or rule out a later bounce.

Features

  • Logs wp_mail() send attempts.
  • Records sent/failed result from WordPress mail hooks.
  • Dashboard statistics.
  • Seven-day activity chart.
  • Search and status filtering.
  • Detailed individual log view.
  • Manual resend as a new attempt from log details when the original message body was captured.
  • CSV export.
  • Optional body, header, attachment, and request IP logging; these fields are disabled by default for new installations.
  • Configurable retention period and optional maximum log count.
  • Optional database cleanup on uninstall.

Important

A “Sent” status means WordPress invoked its mail-success hook or a pre-send integration returned true. WordPress invokes the mail-success hook after PHPMailer returns normally, even if its send result is false, so this status does not guarantee successful transport or final inbox delivery. Check your mail provider’s logs for delivery confirmation.

MailSentra writes each log to the WordPress database before the mail attempt and updates its status from WordPress mail hooks. If a log write fails, email sending continues and MailSentra records a generic diagnostic in the PHP error log. Logging depends on the site’s database being available; a database outage or interrupted request can still prevent a log from being stored or leave it pending.

Expired logs are scheduled for cleanup at most once per day when the site receives traffic. Cleanup runs through WP-Cron in batches of up to 500 rows, scheduling follow-up batches as needed. An optional maximum log count removes the oldest records in these batches and is enforced during cleanup, not on each email send. WP-Cron requires site traffic unless a system cron is configured. Set retention days and maximum log count to 0 to disable both automatic deletion limits.

Development

Run php tests/run.php to execute the plugin’s focused standalone checks.

Screenshots

Dashboard showing email activity, reports, and email log statistics.

Dashboard showing email activity, reports, and email log statistics.

Email log details popup showing diagnostic information for a selected message.

Email log details popup showing diagnostic information for a selected message.

Monthly email report preview.

Monthly email report preview.

Tools page for sending a test email and reviewing the result and mailer diagnostics.

Tools page for sending a test email and reviewing the result and mailer diagnostics.

Plugin Details

Active Installs
0
Total Downloads
402
Version
2.0.2
Requires WP
5.8
Requires PHP
7.4
Tested Up To
7.1.4
Added
2026-10-08
Last Updated
2026-10-18 1:47pm GMT

Ratings

5
0
4
0
3
0
2
0
1
0