Prevents from sending email on dev/staging environments.
Did you by mistake send e-mails from dev machine to production users? We did.
To prevent this situations we created a simple catch-all extension for default Laravel mailer. It will send e-mails only to whitelisted addresses (or to a fallback e-mail address).
This package is meant only for dev/test/staging environments.
- Add package to composer:
composer require "desmart/laravel-mailer:1.2.*"
- Publish configuration:
php artisan vendor:publish
- Edit configuration file:
When mailer is enabled it replaces default
bcc() method call will be intercepted.
If e-mail address is not in whitelist (note: we only do whitelists by domain so be careful with this) it will be changed to
That way every e-mail sent by Laravel will be redirected only to trusted users.
This package should not break compatibility with Laravel Mailer.
desmart/laravel-mailer with Laravel 4.2 switch version to
desmart/laravel-mailer with Laravel 4.1 switch version to