I updated from Larvel 5.8 to 7.3 and then suddenly I noticed that my emails were no longer arriving. Mails are queued and the queue driver is the default database. By digging through the logs, I found that the IlluminateContractsMailFactory class is not instantiable and the log file for that day had more than 100 times content than usual meaning a huge internal logging spike from the updated version.
Furthermore, I also checked the jobs table in my DB and I saw that the maximum (255) attempts were all being exhausted for each mail and hence that would also explain the unprecedented amount of text in my logs that literally slowed down my machine while viewing.
I see there's the exact same issue that has been labeled as bug with the lumen framework as well. see #1057
Did you read the upgrade guide and the part of the new mailer config? https://laravel.com/docs/7.x/upgrade
Did you update the config file? And the new MAIL_MAILER env variable?
Did you read the upgrade guide and the part of the new mailer config? https://laravel.com/docs/7.x/upgrade
Did you update the config file? And the new
MAIL_MAILERenv variable?
With likelihood of impact set to optional and quoting these lines from the docs,
"In order to support multiple mailers, the default mail configuration file has changed in Laravel 7.x to include an array of mailers. However, in order to preserve backwards compatibility, the Laravel 6.x format of this configuration file is still supported. So, no changes are required when upgrading to Laravel 7.x; however, you may wish to examine the new mail configuration file structure and update your file to reflect the changes",
No, I did not bother making any changes for mailer config. However, I will go through this and if this solves the issue, I will update the thread here and will also close the issue.
Thanks for pointing this out.
$app->alias('mail.manager', Illuminate\Mail\MailManager::class);
$app->alias('mail.manager', Illuminate\Contracts\Mail\Factory::class);
Thank khan-zia
Thanks to you khan-zia
Most helpful comment
Solution
https://github.com/laravel/laravel/blob/develop/config/mail.php