PHPackages                             rulr/laravel-mailpot - 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. rulr/laravel-mailpot

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

rulr/laravel-mailpot
====================

A local mail inbox for Laravel

v1.1.0(4mo ago)161.9k↓50%1[1 PRs](https://github.com/rulr-dev/laravel-mailpot/pulls)MITBladePHP ^8.1

Since Jul 11Pushed 4mo agoCompare

[ Source](https://github.com/rulr-dev/laravel-mailpot)[ Packagist](https://packagist.org/packages/rulr/laravel-mailpot)[ RSS](/packages/rulr-laravel-mailpot/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (8)Used By (0)

Mailpot
=======

[](#mailpot)

A local mail inbox for Laravel. No external tools or services required. Mailpot lets you intercept, store, and inspect emails sent during development.

Think of it like [Mailtrap](https://mailtrap.io/) or [Mailhog](https://github.com/mailhog/MailHog), but fully embedded in your Laravel app. No Docker, no SMTP config, no fuss.

[![Screenshot](docs/screenshot.png "Mailpot")](docs/screenshot.png)

Features
--------

[](#features)

- Stores sent mails as `.json` files
- Clean inbox UI built with Tailwind and Alpine.js
- Read/unread tracking (client-side, no database required)
- Resizable viewport preview (mobile, tablet, desktop)
- Stats: message count, storage size, largest/smallest message
- Artisan commands for cleaning inbox and viewing stats
- Configurable storage path
- No third-party tools or services
- Compatible with Laravel 10, 11, and 12

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

[](#installation)

```
composer require --dev rulr/laravel-mailpot
```

This package is intended for local development only.

Mail Configuration
------------------

[](#mail-configuration)

Update your `config/mail.php` file to add the mailpot mailer:

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

Set the mailer in your `.env` file:

```
MAIL_MAILER=mailpot
```

Publishing Configuration
------------------------

[](#publishing-configuration)

To customize the storage path, publish the configuration file:

```
php artisan vendor:publish --tag=mailpot-config
```

This creates `config/mailpot.php` with the following options:

```
return [
    'storage_path' => env('MAILPOT_STORAGE_PATH', storage_path('framework/mailpot')),
];
```

You can set a custom path in your `.env` file:

```
MAILPOT_STORAGE_PATH=/path/to/custom/mailpot
```

If not configured, messages are stored in `storage/framework/mailpot`.

Web UI
------

[](#web-ui)

Visit the inbox in your browser:

```
http://localhost:8000/mailpot

```

The interface allows you to:

- Browse and read emails with subject, from, to, date, and content
- Switch between mobile, tablet, and desktop viewport sizes
- Resize the viewport manually for custom widths
- Track read/unread status (stored in browser localStorage)
- View inbox statistics when no email is selected

The web UI is only available when `APP_ENV=local`.

Artisan Commands
----------------

[](#artisan-commands)

### Show Stats

[](#show-stats)

```
php artisan mailpot:stats
```

Displays a summary of:

- Total message count
- Total inbox size
- Largest and smallest message
- Latest message details

### Clean Inbox

[](#clean-inbox)

```
php artisan mailpot:clean
```

Deletes all stored messages. You will be prompted to optionally delete the stats file as well.

Testing
-------

[](#testing)

This package uses [Orchestra Testbench](https://github.com/orchestral/testbench).

Run tests with:

```
composer test
```

Or directly:

```
./vendor/bin/phpunit
```

Code Quality
------------

[](#code-quality)

Run static analysis:

```
./vendor/bin/phpstan analyse
```

Run code style fixes:

```
./vendor/bin/pint
```

Files and Storage
-----------------

[](#files-and-storage)

Messages are saved to the configured storage path (default: `storage/framework/mailpot`).

- Each email is stored as a `.json` file
- `stats.json` contains cached statistics
- `.gitignore` is auto-generated to exclude messages from Git

Recommended .gitignore
----------------------

[](#recommended-gitignore)

```
/vendor
/.phpunit.result.cache
/storage/framework/mailpot/*
!/storage/framework/mailpot/.gitignore
```

License
-------

[](#license)

MIT. See [LICENSE.md](LICENSE.md)

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

[](#contributing)

Feel free to submit PRs or open issues. Bug fixes, ideas, and improvements are welcome.

Credits
-------

[](#credits)

Created by [Rulr](https://rulr.dev) for Laravel developers who want email to work locally.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance75

Regular maintenance activity

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~29 days

Recently: every ~43 days

Total

7

Last Release

139d ago

Major Versions

v0.02 → v1.0.02025-07-11

v0.03 → v1.0.12025-07-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/90d2f3f97c8a70c3cd012f35a173332932f1913429a90a9ee5a7a20a5e1b1fe7?d=identicon)[raffi](/maintainers/raffi)

---

Top Contributors

[![Raffi-001](https://avatars.githubusercontent.com/u/1436901?v=4)](https://github.com/Raffi-001 "Raffi-001 (17 commits)")

---

Tags

laravelmailemailmailtrap

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rulr-laravel-mailpot/health.svg)

```
[![Health](https://phpackages.com/badges/rulr-laravel-mailpot/health.svg)](https://phpackages.com/packages/rulr-laravel-mailpot)
```

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[railsware/mailtrap-php

The Mailtrap SDK provides methods for all API functions.

56770.5k](/packages/railsware-mailtrap-php)[modernmcguire/mailthief

A Laravel package to catch outbound mail (similar to Mailtrap) that also provides a UI to view them.

318.5k](/packages/modernmcguire-mailthief)

PHPackages © 2026

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