F
Filament9mo ago
WEBMAS

After updating to Laravel 11, the confirmation email and the password reset stopped being sent

Hello. After updating to Laravel 11, the confirmation email and the password reset stopped being sent. What to do? Apparently you need to add listeners somewhere.
8 Replies
WEBMAS
WEBMASOP9mo ago
Help pls!
DariusIII
DariusIII9mo ago
Have you checked Laravel upgrade guide? Maybe there is mention of it somewhere?
DariusIII
DariusIII9mo ago
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
WEBMAS
WEBMASOP9mo ago
I've done experiments. Simply sending an email works, but notifications are not sent. Works: Mail::raw('hello world', function($message) { $message->to('[email protected]')->subject('Testing mails'); }); Does not work: Notification::route('mail', '[email protected]')->notify(new MyNotification()); Resetting your password and retrieving your email uses Notification. Need to understand why Notification doesn't work. I found out if I use ->notify() - the email is not sent ->notifyNow() - if you use this, it is sent. What is the problem? OK. Sending notifications are queued. I ran the php artisan queue:work command and the emails were sent. But why is that? I did not run this command in Laravel 10. All letters were sent immediately. Why is that? I switched QUEUE_CONNECTION=database to QUEUE_CONNECTION=sync and it worked as before.
DariusIII
DariusIII9mo ago
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
WEBMAS
WEBMASOP9mo ago
No. Laravel has made QUEUE_CONNECTION=database the default since version 11. In Laravel 10 this parameter was QUEUE_CONNECTION=sync. QUEUE_CONNECTION=sync - means that all tasks will be executed synchronously without a queue. QUEUE_CONNECTION=database - means that all tasks will be added to the queue in the job table and executed only when the php artisan queue:work queue is running. I returned the value QUEUE_CONNECTION=sync and emails began to be sent immediately.
Jonay.Medina
Jonay.Medina9mo ago
You saved my day. I have the same issue Hi, I'd like to customize the password reset email template. Could you please tell me how to publish the email view for editing?
Abdu
Abdu8mo ago
@WEBMAS thank you very much ! I am using laravel 11 and the issue is that the QUEUE_CONNECTION was set to database instead of sync
Want results from more Discord servers?
Add your server