PHPackages                             joggapp/laravel-mail-viewer - 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. joggapp/laravel-mail-viewer

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

joggapp/laravel-mail-viewer
===========================

View all your mailables at a single place

v7.0.0(5y ago)31656.7k22MITPHPPHP ^7.3

Since Sep 7Pushed 5y ago6 watchersCompare

[ Source](https://github.com/JoggApp/laravel-mail-viewer)[ Packagist](https://packagist.org/packages/joggapp/laravel-mail-viewer)[ RSS](/packages/joggapp-laravel-mail-viewer/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (7)Versions (23)Used By (0)

This package has been archived and will no longer be maintained/updated. The reason being Laravel now itself provides a really convenient way to [preview mailables in the browser](https://laravel.com/docs/8.x/mail#rendering-mailables).
===========================================================================================================================================================================================================================================

[](#this-package-has-been-archived-and-will-no-longer-be-maintainedupdated-the-reason-being-laravel-now-itself-provides-a-really-convenient-way-to-preview-mailables-in-the-browser)

View all your mailables at a single place
=========================================

[](#view-all-your-mailables-at-a-single-place)

[![Latest Version](https://camo.githubusercontent.com/401a154a5bd790543e2aa480ba794c50a1af0729b22e7e719099e70589afe0ba/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4a6f67674170702f6c61726176656c2d6d61696c2d7669657765722e7376673f7374796c653d666c61742d726f756e646564)](https://github.com/JoggApp/laravel-mail-viewer/releases)[![](https://github.com/JoggApp/laravel-mail-viewer/workflows/Run%20Tests/badge.svg?branch=master)](https://github.com/JoggApp/laravel-mail-viewer/workflows/Run%20Tests/badge.svg?branch=master)[![Total Downloads](https://camo.githubusercontent.com/ef7faee0f8c5f7bb71aa72070bb9d39b3a96b1f9ef28c4da36ef7c3082b556fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4a6f67674170702f6c61726176656c2d6d61696c2d7669657765722e7376673f7374796c653d666c61742d726f756e64656426636f6c6f72423d627269676874677265656e)](https://packagist.org/packages/JoggApp/laravel-mail-viewer)

The Design and content team members often need access to the emails your app will be sending out to the users. This is a fairly simple package that makes it possible and tries to minimize developer dependency. By using this package, you can have a dedicated route to view all your mailables at a single place. Having shareable URLs to view the mails makes the team co-ordination more smooth.

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

[](#installation)

You can install this package via composer using this command:

```
composer require joggapp/laravel-mail-viewer
```

The package will automatically register itself.

You will have to add the mailables and configure the other settings using the package's config file in order to to use this package. Please read the comments/description for each config key thoroughly and set their values. You can publish the config file with:

```
php artisan vendor:publish --provider="JoggApp\MailViewer\MailViewerServiceProvider"
```

This will create the package's config file called `mailviewer.php` in the `config` directory. These are the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Only the mailables registered here can be accessed using this package
    |--------------------------------------------------------------------------
    |
    | You have to add the mailables including their dependencies
    | in the following array. When asked for a mailable, the
    | package will search it here for its definition.
    |
    | Add the mailable definition as shown below in the example.
    | The mailable class will be the key and the dependencies
    | of the mailable class will be defined in an array as well.
    |
    | The package will look for the equivalent factory if the
    | dependency is an eloquent model. So don't forget to
    | create those factories. If you want a specific state to
    | be used for your dependency you will have to pass an array
    | with 'class' and 'states' keys. The class key will have the
    | name of the dependency and states should contain an array of
    | factory states you want to apply to the factory, see the
    | MailWithDependencyStates example below.
    |
    | Please note that the factory times/count feature isn't
    | supported for the factories.
    | Eg:
    | What the package supports: factory(Order::class)->create();
    | What the package doesn't support: factory(Order::class, 5)->create();
    |
    | The package will try to resolve all other non-eloquent objects
    | using the Laravel's service container.
    |
    | Also, don't forget to import these classes at the top :)
    |
    | eg:
    | 'mailables' => [
    |     OrderShipped::class => [
    |         Order::class,
    |         'Personal thank you message',
    |     ],
    |     MailWithDependencyStates::class => [
    |         [
    |             'class' => Order::class,
    |             'states' => ['state1', 'state2']
    |         ]
    |     ],
    |     MailWithNoDependency::class => []
    | ]
    |
    */

    'mailables' => [],

    /*
    |--------------------------------------------------------------------------
    | URL where you want to view the mails
    |--------------------------------------------------------------------------
    |
    | This is the URL where you can view all the
    | mailables registered above.
    |
    */

    'url' => 'mails',

    /*
    |--------------------------------------------------------------------------
    | The environments in which the url should be accessible
    |--------------------------------------------------------------------------
    |
    | If you don't want to use this package in production env
    | at all, you can restrict that using this option
    | rather than by using a middleware.
    |
    */

    'allowed_environments' => ['local', 'staging', 'testing'],

    /*
    |--------------------------------------------------------------------------
    | Middlewares that should be applied to the URL
    |--------------------------------------------------------------------------
    |
    | The value should be an array of fully qualified
    | class names of the middleware classes.
    |
    | Eg: [Authenticate::class, CheckForMaintenanceMode::class]
    | Don't forget to import the classes at the top!
    |
    */

    'middlewares' => [],
];
```

How to use
----------

[](#how-to-use)

- After setting up the config values as described above, you can see the list of all mailables by visiting the `/mails` route (considering the default url is 'mails' in the config file). You can modify it to whatever you want as per your needs.
- You can also restrict the environments the package should list the mailables in. By default, the `allowed_environments` config is set to allow 3 environments: `local`, `staging` &amp; `testing`. You can further secure it using the `middlewares` config.
- Default view:

List of all mailsA particular mail rendered[![](https://user-images.githubusercontent.com/11228182/45781093-bb59ef00-bc7c-11e8-9d03-64cf245fd82c.png)](https://user-images.githubusercontent.com/11228182/45781093-bb59ef00-bc7c-11e8-9d03-64cf245fd82c.png)[![](https://user-images.githubusercontent.com/11228182/45780701-c3fdf580-bc7b-11e8-9f48-0d883a640010.png)](https://user-images.githubusercontent.com/11228182/45780701-c3fdf580-bc7b-11e8-9f48-0d883a640010.png)- This package supports the option of overriding the package views that Laravel provides. You can modify the view using [these instructions from the Laravel docs](https://laravel.com/docs/packages#views), as per your needs.

Testing
-------

[](#testing)

You can run the tests with:

```
vendor/bin/phpunit
```

Changelog
---------

[](#changelog)

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

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Harish Toshniwal](https://github.com/introwit)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 76.7% 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 ~36 days

Recently: every ~138 days

Total

21

Last Release

2071d ago

Major Versions

v2.2.0 → v3.0.02018-11-12

v3.1.0 → v4.0.12019-02-26

v4.0.5 → v5.0.02019-09-04

v5.0.1 → v6.0.02020-03-03

v6.0.0 → v7.0.02020-09-10

PHP version history (3 changes)v0.1.0PHP ^7.1

v4.0.2PHP ^7.2

v6.0.0PHP ^7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a1501b9c7151803b2ecc58be89cec4f7e8adaf1753831dc3fb6b8631c9e4e6d?d=identicon)[introwit](/maintainers/introwit)

---

Top Contributors

[![introwit](https://avatars.githubusercontent.com/u/11228182?v=4)](https://github.com/introwit "introwit (56 commits)")[![kielabokkie](https://avatars.githubusercontent.com/u/1221750?v=4)](https://github.com/kielabokkie "kielabokkie (11 commits)")[![vicgonvt](https://avatars.githubusercontent.com/u/7350307?v=4)](https://github.com/vicgonvt "vicgonvt (3 commits)")[![paulredmond](https://avatars.githubusercontent.com/u/177773?v=4)](https://github.com/paulredmond "paulredmond (2 commits)")[![simonschaufi](https://avatars.githubusercontent.com/u/941794?v=4)](https://github.com/simonschaufi "simonschaufi (1 commits)")

---

Tags

laravellaravel-packagemail

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/joggapp-laravel-mail-viewer/health.svg)

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

###  Alternatives

[livewire/livewire

A front-end framework for Laravel.

23.5k75.5M1.8k](/packages/livewire-livewire)[beyondcode/laravel-mailbox

Handle incoming emails in your Laravel application.

1.1k1.0M4](/packages/beyondcode-laravel-mailbox)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)[label84/laravel-mailviewer

View mails sent by Laravel in the browser

1429.5k](/packages/label84-laravel-mailviewer)

PHPackages © 2026

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