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

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

stevelacey/laravel-mail-preview
===============================

Adds a 'preview' mail driver for testing emails in Laravel.

v4.1.1(5y ago)1261MITPHPPHP ^7.2

Since Mar 13Pushed 5y agoCompare

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

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

Laravel Mail Preview
====================

[](#laravel-mail-preview)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9299c1f5f5f2a8e2d98ab11c5adae68f785fe2fe0fc247ab23f00a481582c8fa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746576656c616365792f6c61726176656c2d6d61696c2d707265766965772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stevelacey/laravel-mail-preview)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/b6c7353df805641e8fb5ce26b306f8afc148272531ed416324bd9a8188b82af1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73746576656c616365792f6c61726176656c2d6d61696c2d707265766965772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stevelacey/laravel-mail-preview)

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

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

[](#installation)

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

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

Then publish the config file:

```
php artisan vendor:publish --provider="Steve\LaravelMailPreview\MailPreviewServiceProvider"

```

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

```
MAIL_DRIVER=preview

```

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

[](#how-it-works)

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.

### 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.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 51.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 ~64 days

Recently: every ~127 days

Total

29

Last Release

1966d ago

Major Versions

v1.2.8 → v2.0.02017-09-01

v2.0.3 → v3.0.02018-08-22

v2.1.1 → v3.0.62019-09-17

v3.0.7 → v4.0.02019-10-16

PHP version history (2 changes)v1.0.0PHP &gt;=5.5.9

v4.0.0PHP ^7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/289531?v=4)[Steve Lacey](/maintainers/stevelacey)[@stevelacey](https://github.com/stevelacey)

---

Top Contributors

[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (44 commits)")[![stevelacey](https://avatars.githubusercontent.com/u/289531?v=4)](https://github.com/stevelacey "stevelacey (21 commits)")[![mustafaaloko](https://avatars.githubusercontent.com/u/4721735?v=4)](https://github.com/mustafaaloko "mustafaaloko (2 commits)")[![tvbeek](https://avatars.githubusercontent.com/u/2026498?v=4)](https://github.com/tvbeek "tvbeek (2 commits)")[![bjrnblm](https://avatars.githubusercontent.com/u/2300511?v=4)](https://github.com/bjrnblm "bjrnblm (2 commits)")[![faustbrian](https://avatars.githubusercontent.com/u/22145591?v=4)](https://github.com/faustbrian "faustbrian (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)")[![tholder](https://avatars.githubusercontent.com/u/41235?v=4)](https://github.com/tholder "tholder (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)")[![coderabbi](https://avatars.githubusercontent.com/u/790038?v=4)](https://github.com/coderabbi "coderabbi (1 commits)")

---

Tags

laravelmailmailtrapmailcatchermailcatchmailgrab

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[illuminate/notifications

The Illuminate Notifications package.

483.0M1.1k](/packages/illuminate-notifications)[laravel/ai

The official AI SDK for Laravel.

9782.1M162](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)[spatie/laravel-mail-preview

A mail driver to quickly preview mail

1.3k468.3k8](/packages/spatie-laravel-mail-preview)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

252143.0k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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