When I register a user, or click 'click here to request another', no verification mail is sent, although it answers with 'A fresh verification link has been sent to your email address. ' . I checked my .env
and config/mail.php
file and successfully tested them with tinker and Mail::Send(...)
. I also followed the laravel documentation and tried some solutions, which were discussed here on StackOverflow.
User
extends Authenticatable, implements MustVerifyEmail and uses Notifiable$user->sendEmailVerificationNotification()
in the create function
Auth::routes(['verify' => true]);
to web.phpI assume, that there is something wrong with the standard sendEmailVerificationNotification
implementation, but I am too new to Laravel to figure out what's the problem.
Thanks for your help!
I found my mistake:
I swapped out the User
with my own user class. The column name of the mail address is mail_address, which differs from the default column name. Therefore I added this override to my User
:
public function routeNotificationForMail($notification)
{
return $this->email_address;
}