PHPackages                             jeffersongoncalves/filament-mail - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. jeffersongoncalves/filament-mail

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

jeffersongoncalves/filament-mail
================================

Complete email management UI for Filament: mail logs with preview, database templates with multi-locale editing, delivery tracking, analytics dashboard, and suppression management.

3.3.5(1mo ago)5111↓11.1%MITPHPPHP ^8.2CI passing

Since Apr 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/jeffersongoncalves/filament-mail)[ Packagist](https://packagist.org/packages/jeffersongoncalves/filament-mail)[ Docs](https://github.com/jeffersongoncalves/filament-mail)[ GitHub Sponsors](https://github.com/jeffersongoncalves)[ RSS](/packages/jeffersongoncalves-filament-mail/feed)WikiDiscussions 3.x Synced today

READMEChangelog (10)Dependencies (18)Versions (34)Used By (0)

[![Filament Mail](https://raw.githubusercontent.com/jeffersongoncalves/filament-mail/3.x/art/jeffersongoncalves-filament-mail.jpg)](https://raw.githubusercontent.com/jeffersongoncalves/filament-mail/3.x/art/jeffersongoncalves-filament-mail.jpg)

Filament Mail
=============

[](#filament-mail)

[![Latest Version on Packagist](https://camo.githubusercontent.com/80e8158fe05b6bd52ec7984eb89d739252e5b4de5490cb2f977e3f14ff9c77a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d6d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/filament-mail)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f3b578a07e1008f04407138257f56c531852b40a64c8a74012c1510c4e878396/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d6d61696c2f74657374732e796d6c3f6272616e63683d332e78266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/filament-mail/actions)[![GitHub Code Style Status](https://camo.githubusercontent.com/d83d909f22c8343aae58f31ce104db1130460582e4c3c38bfd0ca7e45fc489bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d6d61696c2f70696e742e796d6c3f6272616e63683d332e78266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jeffersongoncalves/filament-mail/actions)[![Total Downloads](https://camo.githubusercontent.com/dc826c747ded1077293daea47bf3982b125e892c7438b92511de48331c52c3bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6566666572736f6e676f6e63616c7665732f66696c616d656e742d6d61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeffersongoncalves/filament-mail)

Complete email management UI for Filament. Built on top of [jeffersongoncalves/laravel-mail](https://github.com/jeffersongoncalves/laravel-mail), it provides a rich interface for managing email logs, database templates with multi-locale editing, delivery tracking, analytics dashboard, and suppression management.

Compatibility
-------------

[](#compatibility)

PackageFilamentLaravelPHP[1.x](https://github.com/jeffersongoncalves/filament-mail/tree/1.x)3.x10+8.1+[2.x](https://github.com/jeffersongoncalves/filament-mail/tree/2.x)4.x11+8.2+[3.x](https://github.com/jeffersongoncalves/filament-mail/tree/3.x)5.x11+8.2+Features
--------

[](#features)

- **Mail Logs** — Browse, search, and view all sent emails with HTML preview, attachments, headers, and metadata
- **Resend &amp; Retry** — Resend any email or retry failed deliveries directly from the UI
- **Mail Templates** — Create and edit database-driven email templates with multi-locale support (via spatie/laravel-translatable)
- **Swappable Template Editor** — Use Filament RichEditor (default) or Unlayer visual drag-and-drop editor
- **MailNotification** — Send template-based notifications with variable binding, cc, bcc, attachments
- **Template Versioning** — Automatic version history with change tracking
- **Live Preview** — Preview rendered templates with example data in an iframe sandbox
- **Send Test Email** — Send test emails from any template with locale selection
- **Delivery Tracking** — View tracking events (delivered, bounced, opened, clicked, complained) from 5 providers
- **Analytics Dashboard** — Stats overview, daily analytics chart, and delivery rate chart with period filters
- **Suppression Management** — Manage suppressed emails (hard bounces, complaints, manual suppressions)
- **Multi-tenant** — Optional tenant scoping for all queries
- **Configurable** — Disable/enable individual resources, widgets, and pages

Installation
------------

[](#installation)

```
composer require jeffersongoncalves/filament-mail
```

The package requires [jeffersongoncalves/laravel-mail](https://github.com/jeffersongoncalves/laravel-mail) as a dependency. Make sure to run its migrations first:

```
php artisan vendor:publish --tag="laravel-mail-migrations"
php artisan migrate
```

Optionally, publish the config file:

```
php artisan vendor:publish --tag="filament-mail-config"
```

Usage
-----

[](#usage)

Register the plugin in your Filament panel provider:

```
use JeffersonGoncalves\FilamentMail\FilamentMailPlugin;
use LaraZeus\SpatieTranslatable\SpatieTranslatablePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentMailPlugin::make(),

            // Required for multi-locale template editing
            SpatieTranslatablePlugin::make()
                ->defaultLocales(['en', 'pt_BR', 'es']),
        ]);
}
```

The `SpatieTranslatablePlugin` is required for multi-locale template editing. It provides a locale switcher in the header of all template pages (create, edit, view, list). Configure the locales you need in the `defaultLocales()` method.

### Customization

[](#customization)

```
FilamentMailPlugin::make()
    ->navigationGroup('Email')
    ->navigationIcon('heroicon-o-envelope')
    ->navigationSort(50)
    ->mailLogResource()           // Enable/disable mail log resource
    ->mailTemplateResource()      // Enable/disable template resource
    ->mailSuppressionResource()   // Enable/disable suppression resource
    ->statsWidgets()              // Enable/disable stats widgets
    ->analyticsWidget()           // Enable/disable analytics charts
    ->dashboard()                 // Enable/disable dashboard page
    ->tenantScoping()             // Enable/disable tenant scoping
```

### Disabling Features

[](#disabling-features)

```
FilamentMailPlugin::make()
    ->mailSuppressionResource(false)  // Disable suppression management
    ->analyticsWidget(false)          // Disable analytics charts
    ->dashboard(false)                // Disable dashboard page
```

Configuration
-------------

[](#configuration)

```
// config/filament-mail.php

return [
    'resources' => [
        'mail_log' => [
            'enabled' => true,
            'label' => 'Mail Log',
            'plural_label' => 'Mail Logs',
        ],
        'mail_template' => [
            'enabled' => true,
            'label' => 'Mail Template',
            'plural_label' => 'Mail Templates',
        ],
        'mail_suppression' => [
            'enabled' => true,
            'label' => 'Suppression',
            'plural_label' => 'Suppressions',
        ],
    ],

    'widgets' => [
        'stats_overview' => true,
        'analytics_chart' => true,
        'delivery_rate_chart' => true,
    ],

    'dashboard' => [
        'enabled' => true,
    ],

    'navigation' => [
        'group' => 'Email',
        'icon' => 'heroicon-o-envelope',
        'sort' => 50,
    ],

    'template_editor' => [
        'driver' => env('FILAMENT_MAIL_EDITOR', 'rich_editor'),
        'locales' => ['en'],
        'default_locale' => 'en',
        'unlayer_project_id' => env('UNLAYER_PROJECT_ID'),
        'merge_tags' => [],
    ],

    'preview' => [
        'max_width' => '800px',
        'sandbox' => true,
    ],

    'tenant_scoping' => false,
];
```

Template Editor
---------------

[](#template-editor)

The template editor is swappable via config. Set the `FILAMENT_MAIL_EDITOR` environment variable:

```
# Default: standard Filament RichEditor
FILAMENT_MAIL_EDITOR=rich_editor

# Visual drag-and-drop editor via Unlayer
FILAMENT_MAIL_EDITOR=unlayer
UNLAYER_PROJECT_ID=your-project-id
```

When using Unlayer, publish and run the migration for the `body_design` column:

```
php artisan vendor:publish --tag="filament-mail-migrations"
php artisan migrate
```

### Creating a Custom Editor Driver

[](#creating-a-custom-editor-driver)

Implement `TemplateEditorContract` and bind it in a service provider:

```
use JeffersonGoncalves\FilamentMail\Contracts\TemplateEditorContract;

class MyEditorDriver implements TemplateEditorContract
{
    public function getFormField(string $fieldName = 'html_body'): Component
    {
        return MyCustomField::make($fieldName)->columnSpanFull();
    }

    public function render(string $content, array $variables): string
    {
        foreach ($variables as $key => $value) {
            $content = str_replace(
                ['{{' . $key . '}}', '{{ ' . $key . ' }}'],
                (string) $value,
                $content
            );
        }
        return $content;
    }
}

// In a service provider:
$this->app->bind(TemplateEditorContract::class, MyEditorDriver::class);
```

MailNotification
----------------

[](#mailnotification)

Send emails using database templates with variable binding:

```
use JeffersonGoncalves\FilamentMail\Notifications\MailNotification;

// Simple notification
$user->notify(new MailNotification(
    templateKey: 'auth.welcome',
    variables: [
        'name' => $user->name,
        'login_url' => route('login'),
    ],
));

// With locale, cc, and attachments
$user->notify(new MailNotification(
    templateKey: 'transactional.invoice',
    variables: [
        'invoice_number' => $invoice->number,
        'total' => number_format($invoice->total, 2, ',', '.'),
        'due_date' => $invoice->due_date->format('d/m/Y'),
    ],
    metadata: [
        'locale' => 'pt_BR',
        'cc' => ['finance@company.com'],
        'attachments' => [storage_path("invoices/{$invoice->number}.pdf")],
    ],
));

// Without a notifiable (via Notification facade)
use Illuminate\Support\Facades\Notification;

Notification::route('mail', $email)->notify(
    new MailNotification('auth.reset-password', ['url' => $resetUrl])
);
```

### HasMailTemplate Trait

[](#hasmailtemplate-trait)

For traditional Mailables, use the `HasMailTemplate` trait:

```
use JeffersonGoncalves\FilamentMail\Traits\HasMailTemplate;
use Illuminate\Mail\Mailable;

class WelcomeMail extends Mailable
{
    use HasMailTemplate;

    public function __construct(User $user)
    {
        $this->templateKey = 'auth.welcome';
        $this->templateVariables = ['name' => $user->name];
    }

    public function build(): static
    {
        return $this->buildContent();
    }
}
```

Extending Resources
-------------------

[](#extending-resources)

You can extend the default resources by creating your own classes and updating the config:

```
// config/filament-mail.php
'resources' => [
    'mail_log' => [
        'class' => App\Filament\Resources\CustomMailLogResource::class,
    ],
],
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Jefferson Gonçalves](https://github.com/jeffersongoncalves)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance90

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

34

Last Release

27d ago

Major Versions

1.3.2 → 3.3.32026-04-06

1.3.3 → 3.3.42026-04-06

1.3.4 → 3.3.52026-04-06

1.x-dev → 2.x-dev2026-04-26

2.x-dev → 3.x-dev2026-04-26

PHP version history (2 changes)3.0.0PHP ^8.2

1.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411493?v=4)[Jefferson Gonçalves](/maintainers/jeffersongoncalves)[@jeffersongoncalves](https://github.com/jeffersongoncalves)

---

Top Contributors

[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (31 commits)")

---

Tags

analyticsdashboarddrag-and-dropemailemail-templatefilamentfilament-pluginlaravellivewiremailmail-logmail-templatemail-trackingnotificationphpsuppressionunlayerlaravelmailemaillivewireanalyticsfilamentfilament-pluginjeffersongoncalvesmail templatemail-logmail-tracking

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jeffersongoncalves-filament-mail/health.svg)

```
[![Health](https://phpackages.com/badges/jeffersongoncalves-filament-mail/health.svg)](https://phpackages.com/packages/jeffersongoncalves-filament-mail)
```

###  Alternatives

[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

208172.7k7](/packages/bezhansalleh-filament-google-analytics)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

264291.4k7](/packages/croustibat-filament-jobs-monitor)[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

122.4k](/packages/finity-labs-fin-mail)[caresome/filament-neobrutalism-theme

A neobrutalism theme for FilamentPHP admin panels

324.8k1](/packages/caresome-filament-neobrutalism-theme)[ramnzys/filament-email-log

This package provides a Filament resource to view all Laravel outgoing emails.

5211.4k](/packages/ramnzys-filament-email-log)[openplain/filament-tree-view

Tree view for Filament resources - drop-in replacement for Table with drag-and-drop hierarchical data management

3619.3k](/packages/openplain-filament-tree-view)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
