MailWeb is a robust Laravel package that revolutionizes email development and debugging. It seamlessly captures and displays your application's outgoing emails in real-time, making email testing and sharing effortless.
- π§ Real-time Email Interception: Catch and inspect outgoing emails instantly
- π¨ Modern UI: Beautiful, responsive interface for easy navigation
- π Powerful Search: Quickly find emails with advanced search capabilities
- π Email Sharing: Share email previews with your team effortlessly
- π Attachment Support: Handle email attachments with flexible storage options
- π‘οΈ Secure Access Control: Granular control over who can access the dashboard
- π± Mobile Responsive: Optimized interface for both desktop and mobile devices
- PHP 8.1 or higher
- Laravel 9.21|10.0|11.0|12.0
- Install via Composer:
composer require appoly/mail-web
- Run migrations:
php artisan migrate
- Publish config (if needed):
php artisan vendor:publish --tag=mailweb-config --force
Add to your routes file:
Route::mailweb();
Add to your AppServiceProvider
(Laravel 11+) or AuthServiceProvider
:
use Illuminate\Support\Facades\Gate;
public function boot()
{
Gate::define('view-mailweb', function ($user) {
return in_array($user->email, [
'admin@example.com',
// Add authorized emails
]);
});
}
For local development, set in your .env
:
MAIL_MAILER=log
- Access the dashboard at:
{your-app-url}/mailweb
- Configure email storage limit in
.env
:
MAILWEB_LIMIT=30 # Default value
- Set up email pruning (recommended in
routes/console.php
):
use Illuminate\Support\Facades\Schedule;
Schedule::command('mailweb:prune')->daily();
Configure attachment storage in your .env
:
MAILWEB_ATTACHMENTS_DISK=s3 # Or any configured disk
MAILWEB_ATTACHMENTS_PATH=/custom/path # Optional, defaults to /mailweb/attachments
We welcome contributions! Please follow these steps:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
- Clone the repository
- Install dependencies:
composer install
- Link to your test project - add to your test project's
composer.json
:
{
"repositories": [
{
"type": "path",
"url": "../path/to/MailWeb",
"options": {
"symlink": true
}
}
],
"require": {
"appoly/mail-web": "@dev"
}
}
This project is licensed under the MIT License.
Made by Appoly