Download the PHP package asignua/filament-mail-log without Composer

On this page you can find all versions of the php package asignua/filament-mail-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-mail-log

Filament Mail Log

Filament Mail Log

Tests

A read-only log of every message your Laravel application sends, inside a Filament 5 panel. It answers "did the customer get the email, and what did it say?" without a third-party service: each message is followed from the queue to the transport (queued, sending, sent, failed), stored with its recipients, headers, bodies and attachment names, and shown in a sandboxed preview.

Secrets never reach the table: signed-link signatures, tokens, password-reset URLs and "Password: ..." lines are redacted before the copy is stored.

Screenshots

Every message with its status (queued, sent or failed), recipient, subject and type:

The mail log table with sent, queued and failed messages

A failed message keeps the transport error, the recipients and the timeline:

A failed message with the SMTP error

Signed-link signatures and reset tokens are replaced before the copy is stored:

Plain text tab with a redacted signature and token

The HTML tab renders the stored body in a sandboxed frame (no scripts, remote images off until you ask):

The HTML tab

Dark mode:

The mail log in dark mode

Requirements

Installation

Register the plugin on your panel:

Publish and run the migration (the table name and connection come from the config, so decide before migrating):

Access is closed until you open it. A stored mail can hold a one-time code or a private conversation, so with no setup nobody sees the log. Either define the gate ability:

or pass a callback to the plugin (it wins over the gate):

Usage

Logging starts as soon as the package is installed; no code changes. Every Mail::send(), queued mailable and mail notification is recorded.

Status Meaning
queued pushed to a queue (database, redis, ...), no worker took it yet
sending handed to the mailer, the transport has not answered
sent the transport accepted it (stores the message id)
failed the job threw, or the transport threw; the error is stored

The list filters by status, type, recipient (To/Cc/Bcc), period and text in the body. The view page has Details, HTML (sandboxed iframe), Plain text and Headers tabs.

Mail preview for designers

Register the messages and the page appears (same access rule as the log):

Only registered keys can be rendered. The locale is switched for the render and restored afterwards.

Retention

mail-log:prune deletes records older than retention_days (default 90, 0 = keep forever) in small chunks and marks sending rows nobody confirmed for stale_after_minutes as failed. It is scheduled daily at 03:40; set MAIL_LOG_SCHEDULE=false to schedule it yourself.

Configuration

Fluent setters on MailLogPlugin: authorize(), resource(), previews(), previewPage(), previewLocales(), navigationGroup(), navigationSort(), navigationIcon().

Everything else is in the config (php artisan vendor:publish --tag=filament-mail-log-config):

Key Default
enabled true (MAIL_LOG_ENABLED) master switch for logging
connection, table default connection, mail_logs where the log lives
retention_days 90 used by mail-log:prune
schedule.enabled, schedule.time true, 03:40 the prune schedule
body.store, body.max_bytes true, 200000 keep bodies; cut at this many bytes (before redaction)
headers.store, headers.ignore true, auth-like headers the Headers tab
attachments.sizes true store attachment sizes (reads the attachment once more)
redaction.* see below what is removed from stored text
types [] [WelcomeMail::class => 'Welcome mail'] labels; subclasses inherit
preview.csp restrictive Content-Security-Policy inside the preview iframe (no remote images)
preview.csp_remote_images allows https: images policy after "Load remote images"
isolate_connection true write the log on a separate connection (see Gotchas)

Redaction

Applied to the bodies, the subject, the header values and the error text:

It fails closed: a pattern that breaks at run time (PCRE backtrack limit, an invalid regex) replaces the whole text with [redaction failed]. Add the parameters of your own signed links to the list; the defaults can not know them.

Gotchas

Translations

The interface ships in English and Ukrainian (other locales fall back to English) under the filament-mail-log::filament-mail-log namespace. A test keeps every language in step with the English keys. Override a string by publishing the translations (--tag=filament-mail-log-translations) and editing the copy in lang/vendor/filament-mail-log.

AI agents

The package ships Laravel Boost guidelines (resources/boost/guidelines/core.blade.php) so a coding agent wires it up correctly.

Testing

Changelog

See CHANGELOG.md.

License

The MIT License (MIT). See LICENSE.md.


All versions of filament-mail-log with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^5.0
illuminate/contracts Version ^12.0|^13.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asignua/filament-mail-log contains the following files

Loading the files please wait ...