Mail Preview Laravel Driver
Published on by Eric L. Barnes
Mohamed Said has created a new mail driver for Laravel that converts emails to files.
Installation is simple. Just require the package:
composer require themsaid/laravel-mail-preview
Add the service provider:
Themsaid\MailPreview\MailPreviewServiceProvider::class
Finally, change your mail driver to preview:
MAIL_DRIVER=preview
Now when you send emails from your Laravel app the rendered HTML and EML will be saved to the storage/email-previews
folder. This way you can open it through various mail clients, your editor, or the browser for the HTML version.
Eric is the creator of Laravel News and has been covering Laravel since 2012.