appoly / mail-web
Catch your outgoing emails within your project making it easier to test and share
Installs: 3 941
Dependents: 0
Suggesters: 0
Security: 0
Stars: 86
Watchers: 4
Forks: 14
Open Issues: 0
Language:Blade
Requires
- php: ^8.1
- illuminate/console: *
- illuminate/support: ^9.21|^10.0|^11.0
- livewire/livewire: ^3.2
Requires (Dev)
- laravel/pint: ^1.13
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^9.0
- dev-master
- 5.0.6
- 5.0.5
- 5.0.4
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 4.0.9
- 4.0.8
- 4.0.7
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.0.1
- 3.0.0
- 2.1.0
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.1
- 1.0.0
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.1
- dev-add-timestamp-title-to-list-view
- dev-mail-web-5
- dev-pagination
- dev-fix-utf8-error
- dev-78-multiple-to-emails
- dev-move-filters-to-database
- dev-import-fix
- dev-shift-62864
- dev-dependabot/npm_and_yarn/tailwindcss-2.2.7
- dev-dependabot/npm_and_yarn/sass-loader-12.1.0
- dev-dependabot/add-v2-config-file
- dev-dev
This package is auto-updated.
Last update: 2024-11-06 13:22:01 UTC
README
MailWeb is a Laravel package designed to help developers with emails. With MailWeb you can effortlessly catch and view your application's outgoing emails. This allows developers to quickly see, debug and share emails.
Features
- Outgoing Email Capture: Intercept outgoing emails from your Laravel application seamlessly.
- Tailwind UI: Enjoy a sleek and responsive user interface crafted with Tailwind CSS.
- Email Viewing: Easily view captured emails within the Mail Web dashboard.
- Shareable Links: Generate shareable links for email previews, facilitating collaboration and debugging.
- Search Functionality: Quickly search through your emails to find the information you need.
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
For ease, you can publish the assets by adding the following to your composer.json
"post-update-cmd": [ "@php artisan vendor:publish --tag=mailweb-public --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; });
Although it can be dangerous, should you want to allow access to anyone (regardless of authentication) then change the above code to
Gate::define("view-mailweb", function ($user = null) { return true; });
In your local environment, it's advised to set your mail driver to LOG to prevent SMTP errors.
MAIL_MAILER=log
To view emails then go to
{url}\mailweb
Migrating to v5
If you previously used MailWeb you will notice a new archived table. This is because we have changed to data structure making it easier to pull out the email data we need rather than storing the whole email object. We are working on a command to migrate any stored emails over but for the time being these emails will no longer be viewable.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.