Skip to content

Mail Web is a Laravel package which catches emails locally for debugging

Notifications You must be signed in to change notification settings

Shahjalal7311/mail-web

 
 

Repository files navigation

Mail Web is a Laravel package which catches emails locally for debugging

StyleCI Status Total Downloads Latest Stable Version License

Installation

Use the package manager composer to install Mail Web.

composer require appoly/mail-web

Usage

Run the migration

php artisan migrate

Publish the assets to your project using

php artisan vendor:publish --tag=mailweb-public --force

Publish the config to your project using

php artisan vendor:publish --tag=mailweb-config --force

Add MailSending to your EventServiceProvider.php

use Appoly\MailWeb\Http\Listeners\MailWebListener;
use Illuminate\Mail\Events\MessageSending;

class EventServiceProvider extends ServiceProvider
{
    /**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        MessageSending::class => [
            MailWebListener::class
        ]
    ];

To use Mail Web you need to add a Gate to your AuthServiceProvider. If you would like to limit the users that can access the route then use

public function boot()
{
  Gate::define("view-mailweb", function ($user) {
      return in_array($user->email, [
          'user@appoly.co.uk',
      ]);
  });
}

Should you want to allow access to all users then change the above code to

Gate::define("view-mailweb", function ($user) {
    return true;
});

To view emails then go to

{url}\mailweb

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Mail Web is a Laravel package which catches emails locally for debugging

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 33.4%
  • Vue 31.9%
  • JavaScript 17.5%
  • CSS 13.0%
  • HTML 4.2%