View outgoing Laravel emails and their delivery status from the Statamic Control Panel.
This add-on provides the Statamic interface for Laravel Mail Log, which handles the underlying mail capture and storage.
- PHP 8.4+
- Laravel 13
- Statamic 6
- Database connection
- Laravel Mail Log
- Adds a paginated mail log to the Statamic Control Panel
- Orders logged emails newest first
- Displays sent and pending delivery statuses
- Shows sender, recipient, subject, message ID, and timestamps
- Renders HTML emails in a sandboxed preview
- Blocks scripts and remote resources inside previews
- Displays the raw Laravel mail event data
- Integrates with Statamic navigation and role permissions
Install the Composer package:
composer require bobwez98/mail-log-statamicComposer also installs Laravel Mail Log, the base package responsible for recording outgoing emails. Both service providers are registered through package discovery.
Run the migrations supplied by the base package to create the mail_logs table:
php artisan migrateThe View mail log permission shows every outgoing email, including password-reset links. Site owners should only grant it to trusted roles. Super users have access automatically.
No add-on-specific configuration is required. Mail capture and storage are configured by Laravel Mail Log.
Mail logging is enabled by default. It can be disabled in your .env file:
MAIL_LOG_ENABLED=falseSee the Laravel Mail Log documentation for its complete configuration instructions.
Laravel Mail Log listens to Laravel's native mail events and stores each outgoing message in the mail_logs table. This add-on reads those records and makes them available in Statamic under Tools > Mail Log.
The overview is paginated and ordered newest first. Opening a message displays its delivery details, raw event data, and rendered email body.
Email bodies are isolated in a sandboxed iframe with a restrictive Content Security Policy. Scripts, forms, frames, objects, and remote resources are blocked while inline email styles and data or CID image sources are permitted.
Important
This add-on only provides the Statamic Control Panel interface. Laravel Mail Log is required to capture, store, and update mail records.
Open Tools > Mail Log in the Statamic Control Panel. Users must be super users or have the View mail log permission.
Browse logged emails, inspect their delivery status, and use Statamic's pagination controls to move through the results.
Open a message to view its status, sender, recipient, timestamps, and unique message ID.
Review the rendered HTML email without allowing its content to execute scripts or load remote resources.
To ensure the quality of this package, run the following command:
composer qualityThis will execute five tasks:
- Checks if the code is correctly formatted
- Checks for issues using static code analysis
- Makes sure all tests pass
- Verifies 100% code coverage
- Checks for pending Rector changes
Code coverage requires Xdebug with coverage mode enabled.
Install the frontend dependencies and compile the Control Panel assets with:
npm install
npm run buildPlease see CONTRIBUTING for details.
Please report security vulnerabilities privately to info@bobwezelman.nl.
The MIT License (MIT). Please see License File for more information.


