PHPackages                             creagia/laravel-web-mailer - 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. creagia/laravel-web-mailer

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

creagia/laravel-web-mailer
==========================

Laravel Web Mailer

2.0.0(3mo ago)6926.2k↓58.3%4[1 PRs](https://github.com/creagia/laravel-web-mailer/pulls)MITPHPPHP ^8.2CI passing

Since Aug 3Pushed 1w ago2 watchersCompare

[ Source](https://github.com/creagia/laravel-web-mailer)[ Packagist](https://packagist.org/packages/creagia/laravel-web-mailer)[ Docs](https://github.com/creagia/laravel-web-mailer)[ GitHub Sponsors](https://github.com/creagia)[ RSS](/packages/creagia-laravel-web-mailer/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (6)Dependencies (26)Versions (14)Used By (0)

Laravel Web Mailer
==================

[](#laravel-web-mailer)

This package contains a web mailer which will catch all the sent emails. Then, you can view it visiting the route `/web-inbox`. The emails will be stored as a file in the storage folder.

[![Latest Version on Packagist](https://camo.githubusercontent.com/16627b6810dc6378da967182edbd1266fd7d174e25e406227eeb009df2437a0c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f637265616769612f6c61726176656c2d7765622d6d61696c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creagia/laravel-web-mailer)[![GitHub Tests Action Status](https://camo.githubusercontent.com/7e095c62e0ac188de967ed592c4689f376d32bb10cd22e1c8be59f1857802ae4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f637265616769612f6c61726176656c2d7765622d6d61696c65722f72756e2d74657374732e796d6c3f6c6162656c3d7465737473)](https://github.com/creagia/laravel-web-mailer/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/87bb967b71ab5023bbb4d9c841dca2e6facd66701e42d11b024c5d72951d6b92/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f637265616769612f6c61726176656c2d7765622d6d61696c65722f7068702d63732d66697865722e796d6c3f6c6162656c3d636f64652532307374796c65)](https://github.com/creagia/laravel-web-mailer/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/2c78959875ca1bdfb372d9fc43ec93e284611688d2d35c32541e7b49a9840eae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f637265616769612f6c61726176656c2d7765622d6d61696c65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creagia/laravel-web-mailer)

[![Inbox screenshot](/art/screenshot.webp)](/art/screenshot.webp)

Requirements
------------

[](#requirements)

This package requires PHP 8.1 and Laravel 9. If you need compatibility with older versions, check the [alternatives](#alternatives) section.

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

[](#installation)

You can install the package via composer:

```
composer require creagia/laravel-web-mailer
```

After that, open your `config/mail.php` file and add the web mailer entry in the `mailers` configuration array.

```
'mailers' => [
    // ...
    'web' => [
        'transport' => 'web',
    ],
],
```

Finally, you can enable the web mailer setting the defined mailer in your .env file:

```
MAIL_MAILER=web

```

We recommend you to publish the configuration file to be able to perform some customizations

```
php artisan vendor:publish --tag="web-mailer-config"
```

### Inbox URL

[](#inbox-url)

The default URL to view the emails is `/web-inbox`. You can change it, adding the below entry to your .env file:

```
WEB_MAILER_ROUTE_PREFIX="your-custom-url"

```

### Route protection

[](#route-protection)

By default, the inbox URL is authorized for everybody who has the link. If you need to add some protection, you can modify the `middleware` array on the `config/web-mailer.php` file.

### Delete all stored emails

[](#delete-all-stored-emails)

```
php artisan laravel-web-mailer:clear-all
```

### Delete stored emails older than N days

[](#delete-stored-emails-older-than-n-days)

```
php artisan laravel-web-mailer:cleanup
```

You can run or schedule the command `laravel-web-mailer:cleanup` to delete the emails older than N days. By default, it will delete the emails older than 7 days. You can customize the number of days changing the `delete_emails_older_than_days` parameter on the `config/web-mailer.php` file.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Alternatives
------------

[](#alternatives)

- [tkeer/mailbase](https://github.com/tkeer/mailbase)

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)

- [Xavier Muntané](https://github.com/xmuntane)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance90

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~264 days

Recently: every ~297 days

Total

6

Last Release

111d ago

Major Versions

1.0.4 → 2.0.02026-03-15

PHP version history (2 changes)1.0.0PHP ^8.1

2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb8d6e5cd2001939a7ab04426d1c21068da6cb9925a6a26aa5aca5b9a1338afa?d=identicon)[creagia](/maintainers/creagia)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (20 commits)")[![dtorras](https://avatars.githubusercontent.com/u/240932?v=4)](https://github.com/dtorras "dtorras (17 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")[![xmuntane](https://avatars.githubusercontent.com/u/4507708?v=4)](https://github.com/xmuntane "xmuntane (8 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")

---

Tags

laravelmailerlaravelmailcreagialaravel-web-mailer

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/creagia-laravel-web-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/creagia-laravel-web-mailer/health.svg)](https://phpackages.com/packages/creagia-laravel-web-mailer)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M101](/packages/dedoc-scramble)[vormkracht10/laravel-mails

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

24857.5k](/packages/vormkracht10-laravel-mails)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)

PHPackages © 2026

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