TIP 53 / 73

You Can Send E-mails to a Custom Log File.

In Laravel you can send e-mails to a custom log file.

You can set your environment variables like this:

code
MAIL_MAILER=log
MAIL_LOG_CHANNEL=mail

And also configure your log channel:

code
'mail' => [
    'driver' => 'single',
    'path' => storage_path('logs/mails.log'),
    'level' => env('LOG_LEVEL', 'debug'),
],

Now you have all your e-mails in /logs/mails.log

It's a good use case to quickly test your mails.