PHPackages                             backstage/filament-mails - 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. backstage/filament-mails

Abandoned → [backstage/mails](/?search=backstage%2Fmails)Library[Mail &amp; Notifications](/categories/mail)

backstage/filament-mails
========================

View logged mails and events in a beautiful Filament UI.

v4.0.0(1mo ago)15942.9k↑10.7%251MITPHPPHP ^8.2CI passing

Since Sep 4Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/backstagephp/mails)[ Packagist](https://packagist.org/packages/backstage/filament-mails)[ Docs](https://github.com/backstagephp/mails)[ GitHub Sponsors](https://github.com/vormkracht10)[ RSS](/packages/backstage-filament-mails/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (210)Used By (1)

View all sent emails and events from your Laravel app with Filament
===================================================================

[](#view-all-sent-emails-and-events-from-your-laravel-app-with-filament)

Backstage Mails
---------------

[](#backstage-mails)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bf525e17c0bfc25f799ea29d58a808b90c6739f5327db65a225c76fc0adfb9a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6261636b73746167652f6d61696c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/backstage/mails)[![GitHub Tests Action Status](https://camo.githubusercontent.com/cab967503f39bebc85ee6de1ee0fc237282ac83159f8bd1eb149acd9e8668f7c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6261636b73746167657068702f6d61696c732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/backstagephp/mails/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c277829d596e621e4faa14e89f64734e575bcba1fc60648d76b54088854a4615/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6261636b73746167657068702f6d61696c732f6669782d7068702d636f64652d7374796c696e672e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/backstagephp/mails/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/36dfe27424ef27996195422963fe8e2b87455f9a604e04713e48a04468a5f863/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6261636b73746167652f6d61696c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/backstage/mails)

Nice to meet you, we're [Backstage](https://backstagephp.com)
-------------------------------------------------------------

[](#nice-to-meet-you-were-backstage)

Hi! We are a web development agency from Nijmegen in the Netherlands and we use Laravel for everything: advanced websites with a lot of bells and whistles and large web applications.

About the package
-----------------

[](#about-the-package)

Mails can collect everything you might want to track about the mails that has been sent by your Filament app. Common use cases are provided in this package:

- Log all sent emails with only specific attributes
- View all sent emails in the browser using the viewer
- Collect feedback about the delivery from email providers using webhooks
- Get automatically notified when email bounces
- Prune logging of emails periodically
- Resend logged email to same or another recipient

Upcoming features
-----------------

[](#upcoming-features)

- We're currently in the process of writing mail events support for other popular email service providers like Resend, SendGrid, Amazon SES and Mailtrap.
- Relate emails being send in Laravel directly to Eloquent models, for example the order confirmation email attached to an Order model.

Why this package
----------------

[](#why-this-package)

Email as a protocol is very error prone. Succesfull email delivery is not guaranteed in any way, so it is best to monitor your email sending realtime. Using external services like Postmark, Mailgun or Resend email gets better by offering things like logging and delivery feedback, but it still needs your attention and can fail silently but horendously. Therefore we created Laravel Mails that fills in all the gaps.

The package is built on top of [Laravel Mails](https://github.com/backstagephp/laravel-mails).

[![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mails.jpeg)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mails.jpeg)

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

[](#installation)

You can install the package via composer:

```
composer require backstage/mails
```

You can publish and run the migrations with:

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

You can publish the config file with:

```
php artisan vendor:publish --tag="mails-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="mails-views"
```

Add the plugin to your `PanelProvider`

```
use Backstage\Mails\MailsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(MailsPlugin::make());
}
```

### Security

[](#security)

Using the `canManageMails()` method, you can define which users have access to the mail resources/pages. Here's a comprehensive example that includes additional logic for flexibility:

```
use Backstage\Mails\MailsPlugin;
use Illuminate\Support\Facades\Auth;

$panel
    ->plugins([
        MailsPlugin::make()
            ->canManageMails(function () {
                $user = Auth::user();

                // Allow access for users with specific roles
                if ($user->hasRole('admin') || $user->hasRole('supervisor')) {
                    return true;
                }

                // Allow access for users with specific permissions
                if ($user->hasPermissionTo('manage mails')) {
                    return true;
                }

                // Restrict access for all other users
                return false;
            }),
    ]);
```

This example demonstrates how to combine role-based and permission-based access control, providing a more robust and flexible approach to managing access to mail resources.

Important

For setting up the webhooks to register mail events, please look into the README of [Laravel Mails](https://github.com/backstagephp/laravel-mails), the underlying package that powers this package.

### Configuration

[](#configuration)

Sometimes you want to customize the resource, like configuring which users or roles may access the resource. You can do this by overriding the `MailResource` or `EventResource` classes in the `mails` config file. Make sure your custom resource extends the original resource.

```
return [
    'resources' => [
        'mail' => \App\Filament\Resources\MailResource::class,
        'event' => \App\Filament\Resources\EventResource::class,
        'suppression' => \App\Filament\Resources\SuppressionResource::class
    ],
];
```

Features and screenshots
------------------------

[](#features-and-screenshots)

### List with all sent emails and statistics

[](#list-with-all-sent-emails-and-statistics)

The package provides a clear overview of all emails, including statistics and the ability to filter the data. [![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mails-list.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mails-list.png)

### Resending emails

[](#resending-emails)

You can resend emails to the same or another recipient(s). This is useful when your email has bounced and you want to resend it. [![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-resend.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-resend.png)

### Information

[](#information)

You can view all relevant information about the email, such as the subject, the body, the attachments, the from address, the to address(es), the cc address(es), the bcc address(es), the reply to address, metadata and much more. [![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-sender-information.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-sender-information.png)[![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-statistics.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-statistics.png)[![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-events.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-events.png)[![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-attachments.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-attachments.png)

### Preview email

[](#preview-email)

The package provides a preview of the email. This is useful to quickly check if the email is correct. [![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-preview.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-preview.png)

We also provide the raw HTML and plain text of the email. [![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-raw-html.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-raw-html.png)

### Events

[](#events)

The package also logs all events that are fired when an email is sent. This is useful to track the email sending process. [![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/events-list.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/events-list.png)[![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/event-details.png)](https://raw.githubusercontent.com/backstagephp/mails/main/docs/event-details.png)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Baspa](https://github.com/backstagephp)
- [Mark van Eijk](https://github.com/markvaneijk)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance90

Actively maintained with recent releases

Popularity48

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 62% 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 ~3 days

Total

155

Last Release

53d ago

Major Versions

v1.0.5 → v2.0.12025-01-03

v2.3.8 → v3.0.02025-06-24

v2.0.18 → v3.0.82026-03-25

2.x-dev → 4.x-dev2026-03-27

PHP version history (2 changes)v1.0.0PHP ^8.1

v3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c6a425dc8645907a118a007438172d58c2016773f54ab3a834beff172632f13?d=identicon)[ux](/maintainers/ux)

---

Top Contributors

[![Baspa](https://avatars.githubusercontent.com/u/10845460?v=4)](https://github.com/Baspa "Baspa (207 commits)")[![markvaneijk](https://avatars.githubusercontent.com/u/1925388?v=4)](https://github.com/markvaneijk "markvaneijk (84 commits)")[![mhortulanus](https://avatars.githubusercontent.com/u/91618246?v=4)](https://github.com/mhortulanus "mhortulanus (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")[![Skullbock](https://avatars.githubusercontent.com/u/1104083?v=4)](https://github.com/Skullbock "Skullbock (4 commits)")[![cntabana](https://avatars.githubusercontent.com/u/6320126?v=4)](https://github.com/cntabana "cntabana (2 commits)")[![vincentvankekerix](https://avatars.githubusercontent.com/u/32239111?v=4)](https://github.com/vincentvankekerix "vincentvankekerix (1 commits)")[![bariskanberkay](https://avatars.githubusercontent.com/u/48731845?v=4)](https://github.com/bariskanberkay "bariskanberkay (1 commits)")[![HelgeSverre](https://avatars.githubusercontent.com/u/1089652?v=4)](https://github.com/HelgeSverre "HelgeSverre (1 commits)")[![iAmKevinMcKee](https://avatars.githubusercontent.com/u/4503765?v=4)](https://github.com/iAmKevinMcKee "iAmKevinMcKee (1 commits)")[![somegooser](https://avatars.githubusercontent.com/u/49899368?v=4)](https://github.com/somegooser "somegooser (1 commits)")[![atmonshi](https://avatars.githubusercontent.com/u/1952412?v=4)](https://github.com/atmonshi "atmonshi (1 commits)")

---

Tags

emaillaravellaravel-frameworklaravel-packagemailmailgunpostmarklaravelmailsbackstagephp

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/backstage-filament-mails/health.svg)

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

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[backstage/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24157.5k5](/packages/backstage-laravel-mails)[wnx/laravel-sends

Keep track of outgoing emails in your Laravel application.

200427.3k](/packages/wnx-laravel-sends)[spatie/laravel-discord-alerts

Send a message to Discord

151408.0k](/packages/spatie-laravel-discord-alerts)[rickdbcn/filament-email

Log all outbound emails you send through your Filament application

126246.1k1](/packages/rickdbcn-filament-email)[spatie/laravel-mailcoach-sdk

An SDK to easily work with the Mailcoach API in Laravel apps

41290.2k1](/packages/spatie-laravel-mailcoach-sdk)

PHPackages © 2026

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