Laravel Mail to Log

One more reason why your MAIL_DRIVER=log configuration may not be working as expected is that you have your QUEUE_DRIVER set to something other than sync.

Thanks to the tip by gibex on Laracasts.


This is in your mail.php config file...

When using

'driver' => env('MAIL_DRIVER', 'log'),

This will get the MAIL_DRIVER environment variable set in your .env file. In this case, 'log' is used only as a default if a value is not specified in your .env file... Your .env file probably has this still set in it... set it to log...

MAIL_DRIVER=smtp

replace with

MAIL_DRIVER=log

NOTE: For laravel >= 7.x MAIL_DRIVER replaced with MAIL_MAILER variable

Tags:

Php

Email

Laravel