Download the PHP package rnsharma93/laravel-email-sandbox without Composer
On this page you can find all versions of the php package rnsharma93/laravel-email-sandbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rnsharma93/laravel-email-sandbox
More information about rnsharma93/laravel-email-sandbox
Files in rnsharma93/laravel-email-sandbox
Package laravel-email-sandbox
Short Description Production-ready self-hosted email testing driver for Laravel with attachment preview and secure dashboard.
License MIT
Informations about the package laravel-email-sandbox
Laravel Email Sandbox
A beautiful, self-hosted email testing driver & dashboard for Laravel β ideal for staging environments.
Laravel Email Sandbox allows you to easily intercept, capture, and preview outgoing emails inside your application without sending real emails to your users. It comes with a stunning, highly responsive dashboard deeply inspired by Mailpitβbuilt natively for Laravel with zero NPM dependencies.
Instead of paying for a hosted inbox (like Mailtrap) or installing extra software (like Mailpit) on your staging server, this package captures every outgoing email straight into your own database and renders it in a built-in dashboard.
π Requirements
- PHP
8.1or higher - Laravel
10.x,11.x, or12.x
π Table of Contents
- Key Features
- Screenshots
- Installation
- Usage
- Access Control & Security
- Configuration
- Developed By
- License & Open Source
β¨ Key Features
- Mailpit-Inspired Interface: Beautiful, responsive UI built with Tailwind CSS & Alpine.js (via CDN, no build step required).
- Comprehensive Email Previews: Preview emails in HTML, Text, and HTML Source formats.
- Responsive Previews: Interactive device toggles (Desktop, Tablet, Mobile) to test your email's responsiveness instantly.
- Raw
.emlSnapshotting: Captures and stores the exact raw network string (Multipart MIME) for low-level debugging. - Advanced Filtering: Instantly search your inbox by Subject, Body, Sender, Recipient, or Date Ranges.
- Detailed Headers: View completely parsed
Message-ID,Date,Mime-Version, and all exact headers just like they were sent. - Attachment Support: Safely capture, list, and download all email attachments natively.
- Mass Deletion: Keep your database clean with "Delete All" functionality.
- Secure by Default: Uses Laravel auth & Gates to ensure only authorized admins can access the dashboard outside of
local.
πΈ Screenshots
Inbox
Email Preview (HTML / Text / Headers / Raw)
π Installation
Require the package via Composer:
Publish the configuration file (optional β sensible defaults are used otherwise):
The package migrations are loaded automatically. Run them to create the email_messages table:
π¨ Usage
To start capturing outgoing emails, open your .env file and change your mail transport driver to email-sandbox:
Now, any email sent by Laravel will be intercepted and stored in your database & local storage instead of actually being delivered.
You can view all captured emails by navigating to:
π http://your-app.test/email-sandbox
[!WARNING] This driver never delivers real email. Use it on
localandstagingonly. If you setMAIL_MAILER=email-sandboxin production, your real outgoing emails will be silently captured instead of sent to your users.
Capturing only some emails
If you'd rather keep your default mailer untouched and only route specific messages to the sandbox, send them through the email-sandbox mailer explicitly:
π Access Control & Security
By default, the Email Sandbox UI is fully accessible in the local environment.
However, if you deploy this to production, staging, or testing environments, the route is completely locked down by default. To authorize specific users to view the dashboard in non-local environments, you must define the accessEmailSandbox Gate in your application's App\Providers\AppServiceProvider:
π§° Configuration
After publishing the config file, you can adjust the following options in config/email-sandbox.php:
| Option | Default | Description |
|---|---|---|
route_prefix |
email-sandbox |
URL prefix for the dashboard routes. |
storage_path |
storage/app/email-sandbox |
Disk location for raw .eml snapshots and email attachments. |
π¨βπ» Developed By
Ram Sharma
- GitHub: @rnsharma93
- Email: [email protected]
If you find this package helpful in your day-to-day development and testing workflow, please consider starring the repository on GitHub!
π License & Open Source
The Laravel Email Sandbox package is open-source software licensed under the MIT license.
You are completely free to use, modify, and distribute this package in both personal and commercial projects. Contributions, issues, and feature requests are always welcome! Feel free to check the issues page if you want to contribute.
All versions of laravel-email-sandbox with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/mail Version ^10.0|^11.0|^12.0
symfony/mailer Version ^6.2|^7.0
symfony/mime Version ^6.2|^7.0