NEW Laravel 12 Support Added

Intercepts Emails.
Master Workflow.

Mail Sandbox is a blazing-fast, lightweight email interception package for Laravel. Stop relying on external services for local testing. Inspect every pixel of your outgoing mails instantly.

Start Integration
composer require ashishdhakal/mail-sandbox
Dashboard Preview
Beautiful Gmail-like UI

Core Features

Engineered for developer productivity and seamless local testing.

Live Discovery

Lightning-fast full-text search across subjects, recipients, and even attachment filenames with debounced AJAX updates.

Absolute Attachments

Zero-loss capture. Handles unlimited duplicate filenames and identical files using unique index-based routing.

Zero Config

Drop it in and it works. Intercepts all outgoing mail traffic automatically based on your environment settings.

System Prerequisites

PHP Version

v8.1 +

Laravel

v10 +

Quick Setup

1

Install via Composer

composer require ashishdhakal/mail-sandbox
2

Publish & Migrate

Publish the package configuration and database migrations:

php artisan vendor:publish --tag=mail-sandbox-config
php artisan vendor:publish --tag=mail-sandbox-migrations
php artisan migrate
3

Configure Mailer

Add the custom driver to your config/mail.php:

'mailers' => [
    'sandbox' => [
        'transport' => 'sandbox',
    ],
],

Update your .env to activate it:

MAIL_MAILER=sandbox

Usage & Access

Usage

Once installed and enabled, any email sent by your application will be intercepted and stored.

Accessing the Interface

You can view the intercepted emails at:

/mail-sandbox

For example: http://localhost:8000/mail-sandbox

Use Cases

01. Multi-Recipient Flows

Testing notifications that go to 5 different users? Don't fill your personal inbox. See all 5 messages side-by-side in your local dashboard.

02. Complex Attachments

Verify that your automated Invoice PDFs are generating correctly without waiting for slow Mailtrap API requests.

03. Air-Gapped Development

Working without internet? Local Sandbox doesn't need an external API to capture and display emails. Total offline independence.

04. UX/Design Refinement

With the Gmail-style UI, you can inspect HTML layouts, responsive images (CIDs), and plain-text fallbacks in real-time.