PHPackages                             se468/laravel-mail-preview - 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. se468/laravel-mail-preview

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

se468/laravel-mail-preview
==========================

Extension to Laravel-Mail-Preview by Mohamed Said. Adds a 'preview' and 'local' mail driver for testing emails in laravel.

v2.0.5(8y ago)2884MITPHPPHP &gt;=5.5.9

Since Mar 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/se468/laravel-mail-preview)[ Packagist](https://packagist.org/packages/se468/laravel-mail-preview)[ Docs](https://github.com/se468/laravel-mail-preview)[ RSS](/packages/se468-laravel-mail-preview/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (20)Used By (0)

Laravel Mail Preview / Local Email Inbox Driver
===============================================

[](#laravel-mail-preview--local-email-inbox-driver)

Forked from [Laravel Mail Preview](https://github.com/themsaid/laravel-mail-preview).

This package introduces a new `preview` and `local` mail driver for Laravel that when selected will render the content of the sent email and save it as both `.html` and `.eml` files.

[![localemail](https://camo.githubusercontent.com/82dbcb53668964feda95b96d226610901993e08439fbf9adcc67b3eadb20527b/68747470733a2f2f7365796f6e6763686f2e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031382f30332f53637265656e2d53686f742d323031382d30332d33302d61742d31312e35332e33302d414d2e706e67 "Local Email")](https://camo.githubusercontent.com/82dbcb53668964feda95b96d226610901993e08439fbf9adcc67b3eadb20527b/68747470733a2f2f7365796f6e6763686f2e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031382f30332f53637265656e2d53686f742d323031382d30332d33302d61742d31312e35332e33302d414d2e706e67)

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

[](#installation)

Begin by installing the package through Composer. Run the following command in your terminal:

```
composer require se468/laravel-mail-preview
```

Then publish the config file:

```
php artisan vendor:publish --provider="Themsaid\MailPreview\MailPreviewServiceProvider"

```

Finally, change `MAIL_DRIVER` to `preview` or `local` in your `.env` file:

```
MAIL_DRIVER=preview

or

MAIL_DRIVER=local

```

Run

```
php artisan migrate

and

php artisan vendor:publish --tag=public --force

```

How it works
------------

[](#how-it-works)

### Mail Preview

[](#mail-preview)

Everytime an email is sent, an `.html` and `.eml` file will be generated in `storage/email-previews` with a name that includes the first recipient and the subject:

```
1457904864_jack_at_gmail_com_invoice_000234.html
1457904864_jack_at_gmail_com_invoice_000234.eml

```

You can open the `.html` file in a web browser, or open the `.eml` file in your default email client to have a realistic look at the final output.

### Local Email Storage

[](#local-email-storage)

If you are using `local` for the `MAIL_DRIVER`, you can go to `/email-previews` route to see all the emails that has been stored. It will create a local inbox where you can see and preview the emails that's sent out.

### Preview in a web browser

[](#preview-in-a-web-browser)

When you open the `.html` file in a web browser you'll be able to see how your email will look, however there might be some differences that varies from one email client to another.

At the beginning of the generated file you'll find an HTML comment with all the message info:

```

```

Package Configurations
----------------------

[](#package-configurations)

From the `config/mailpreview.php` file you'll be able to change the output location of the preview files as well as the maximum lifetime for keeping previews, after this time old previews will get removed.

### Logged out after clicked on the preview link

[](#logged-out-after-clicked-on-the-preview-link)

You will always lose your current session if you click on the generated notification link. This is because Laravel stores the session in an encrypted cookie. To change this behavior, you have to adjust the `middleware` property in the `config/mailpreview.php` file to match the following snippet:

```
    'middleware' => [
        \App\Http\Middleware\EncryptCookies::class,
    ],
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 61.8% 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 ~43 days

Recently: every ~23 days

Total

18

Last Release

2974d ago

Major Versions

v1.2.8 → v2.0.02017-09-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/47734150c4de2c84b26e02fb4f6dcaecf3bcc2c4721b9dfd339ac09d31fab05b?d=identicon)[se468](/maintainers/se468)

---

Top Contributors

[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (42 commits)")[![se468](https://avatars.githubusercontent.com/u/1775954?v=4)](https://github.com/se468 "se468 (10 commits)")[![bjrnblm](https://avatars.githubusercontent.com/u/2300511?v=4)](https://github.com/bjrnblm "bjrnblm (2 commits)")[![mustafaaloko](https://avatars.githubusercontent.com/u/4721735?v=4)](https://github.com/mustafaaloko "mustafaaloko (2 commits)")[![coderabbi](https://avatars.githubusercontent.com/u/790038?v=4)](https://github.com/coderabbi "coderabbi (1 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (1 commits)")[![hosmelq](https://avatars.githubusercontent.com/u/1166143?v=4)](https://github.com/hosmelq "hosmelq (1 commits)")[![JayBizzle](https://avatars.githubusercontent.com/u/340752?v=4)](https://github.com/JayBizzle "JayBizzle (1 commits)")[![mattsparks](https://avatars.githubusercontent.com/u/1678388?v=4)](https://github.com/mattsparks "mattsparks (1 commits)")[![mikemand](https://avatars.githubusercontent.com/u/745184?v=4)](https://github.com/mikemand "mikemand (1 commits)")[![Omranic](https://avatars.githubusercontent.com/u/406705?v=4)](https://github.com/Omranic "Omranic (1 commits)")[![aaronfahey](https://avatars.githubusercontent.com/u/6274449?v=4)](https://github.com/aaronfahey "aaronfahey (1 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (1 commits)")[![adrianogl](https://avatars.githubusercontent.com/u/4664367?v=4)](https://github.com/adrianogl "adrianogl (1 commits)")[![chefe](https://avatars.githubusercontent.com/u/1331316?v=4)](https://github.com/chefe "chefe (1 commits)")[![chrisbjr](https://avatars.githubusercontent.com/u/571279?v=4)](https://github.com/chrisbjr "chrisbjr (1 commits)")

---

Tags

laravelmail

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/se468-laravel-mail-preview/health.svg)

```
[![Health](https://phpackages.com/badges/se468-laravel-mail-preview/health.svg)](https://phpackages.com/packages/se468-laravel-mail-preview)
```

###  Alternatives

[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[sunaoka/laravel-ses-template-driver

Amazon SES template mail driver for Laravel.

1088.0k](/packages/sunaoka-laravel-ses-template-driver)

PHPackages © 2026

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