Answer the question
In order to leave comments, you need to log in
Why is an auto-email verification email not sent?
When registering a user (Laravel Auth), a verification email should be sent. And this letter stopped sending by itself. Only if you click on the request link of this letter (such as if you did not receive a letter, click here). In this case, the letter arrives immediately. And if the user has registered and does not click anywhere, then no.
There are no
errors in the logs.
The user sees a page with a message that the email needs to be verified.
The user has no access except to this page (i.e. the rule itself works)
The last event with registration is included
in web.php - I made an entry in EventServiceProvider.phpAuth::routes(['verify' => true]);
'Illuminate\Auth\Events\Registered' => [
'App\Listeners\Auth\LogRegisteredUser',
],
MAIL_DRIVER=log
Answer the question
In order to leave comments, you need to log in
The error was, just in EventServiceProvider.php.
There were conflicting classes (the one that is commented out)
Registered::class => [
SendEmailVerificationNotification::class,
'App\Listeners\Auth\LogRegisteredUser'
],
// 'Illuminate\Auth\Events\Registered' => [
// 'App\Listeners\Auth\LogRegisteredUser',
// ],
php artisan config:cache
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question