If all you need is to customize the message, as per the docs, you can pass a closure to the toMailUsing method provided by the Illuminate\Auth\Notifications\VerifyEmail notification.
// AuthServiceProvider
use Illuminate\Auth\Notifications\VerifyEmail;
use Illuminate\Notifications\Messages\MailMessage;
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
// ...
VerifyEmail::toMailUsing(function ($notifiable, $url) {
return (new MailMessage)
->subject('Verify Email Address')
->line('Click the button below to verify your email address.')
->action('Verify Email Address', $url);
});
}
If you want to change the structure of the notification email as well you can publish the notification view by running:
php artisan vendor:publish --tag=laravel-notifications
After this, you can go ahead and make any changes to the view. Note that this will apply to all the notifications sent through the app, and not just the verify email.
Edit:
You can also override the sendEmailVerificationNotification() if you want to send the notifications conditionally:
use Illuminate\Auth\Notifications\VerifyEmail;
use App\Notifications\CustomVerifyEmail;
class User extends Authenticatable implements MustVerifyEmail
{
public function sendEmailVerificationNotification()
{
$condition ? $this->notify(new CustomVerifyEmail) : $this->notify(new VerifyEmail);
}
}