appoly/mail-web

Catch your outgoing emails within your project making it easier to test and share

Fund package maintenance!
appoly
Patreon

Installs: 4 881

Dependents: 0

Suggesters: 0

Security: 0

Stars: 86

Watchers: 3

Forks: 15

Open Issues: 0

Language:Vue

6.0.4 2025-03-19 14:34 UTC

README

MailWeb

A powerful Laravel email debugging and testing tool

Total Downloads Latest Stable Version License

🚀 Overview

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.

✨ Features

  • 📧 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

📋 Requirements

  • PHP 8.1 or higher
  • Laravel 9.21|10.0|11.0|12.0

🔧 Installation

  1. Install via Composer:
composer require appoly/mail-web
  1. Run migrations:
php artisan migrate
  1. Publish config (if needed):
php artisan vendor:publish --tag=mailweb-config --force

⚙️ Configuration

1. Route Registration

Add to your routes file:

Route::mailweb();

2. Access Control

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
        ]);
    });
}

3. Local Development

For local development, set in your .env:

MAIL_MAILER=log

📝 Usage

  1. Access the dashboard at:
{your-app-url}/mailweb
  1. Configure email storage limit in .env:
MAILWEB_LIMIT=30  # Default value
  1. Set up email pruning (recommended in routes/console.php):
use Illuminate\Support\Facades\Schedule;

Schedule::command('mailweb:prune')->daily();

💾 Attachment Storage

Configure attachment storage in your .env:

MAILWEB_ATTACHMENTS_DISK=s3  # Or any configured disk
MAILWEB_ATTACHMENTS_PATH=/custom/path  # Optional, defaults to /mailweb/attachments

🤝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

Local Development Setup

  1. Clone the repository
  2. Install dependencies:
composer install
  1. 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"
    }
}

📄 License

This project is licensed under the MIT License.

Made by Appoly