Search by

bobwez98 / mail-log-statamic

BobWez98

A Statamic Control Panel interface for mail logs.

Package info

github.com/BobWez98/mail-log-statamic

Type:package

pkg:composer/bobwez98/mail-log-statamic

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-10-03 17:17 UTC

This package is auto-updated.

Last update: 2026-10-03 17:19:32 UTC


README

GitHub Workflow Status MIT Licensed Latest Version on Packagist

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.

Requirements

Features

  • Adds a paginated mail log to the Statamic Control Panel
  • Orders logged emails newest first
  • Displays sent, pending, and failed 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

Installation

Install the Composer package:

composer require bobwez98/mail-log-statamic

Composer 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 migrate

Grant the View mail log permission to every Statamic role that should be able to inspect logged emails. Super users have access automatically.

Configuration

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=false

See the Laravel Mail Log documentation for its complete configuration instructions.

How It Works

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.

Usage

Open Tools > Mail Log in the Statamic Control Panel. Users must be super users or have the View mail log permission.

Mail log overview

Browse logged emails, inspect their delivery status, and use Statamic's pagination controls to move through the results.

Mail log overview

Delivery details

Open a message to view its status, sender, recipient, timestamps, and unique message ID.

Mail delivery details

Email preview

Review the rendered HTML email without allowing its content to execute scripts or load remote resources.

Sandboxed email preview

Quality

To ensure the quality of this package, run the following command:

composer quality

This will execute five tasks:

  1. Checks if the code is correctly formatted
  2. Checks for issues using static code analysis
  3. Makes sure all tests pass
  4. Verifies 100% code coverage
  5. 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 build

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please report security vulnerabilities privately to info@bobwezelman.nl.

Credits

License

The MIT License (MIT). Please see License File for more information.