appoly/mail-web

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

Fund package maintenance!
appoly
Patreon

Installs: 2 241

Dependents: 0

Suggesters: 0

Security: 0

Stars: 60

Watchers: 3

Forks: 12

Open Issues: 3

Language:JavaScript

4.0.1 2022-08-26 09:32 UTC

README

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

Total Downloads Latest Stable Version License

68747470733a2f2f7777772e6170706f6c792e636f2e756b2f6170702f75706c6f6164732f323032322f30342f6d61696c2d7765622e706e67

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

Register the routes using the mailweb macro

Route::mailweb();

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