Laravel comes with a default forgot password feature as part of its built-in authentication system, which is powered by Laravel Breeze, Laravel Jetstream, or Laravel Fortify depending on the setup .
But if you want to change the style of the existing email to a custom one you can follow these steps.
- Open Your PasswordResetLink controller in auth folder. There you can see a method Password::sendResetLink() . we can do additional codes to this.

- Replace the above code with following
$status = Password::sendResetLink( $request->only('email'), function ($user, $token) { // Use the custom notification $email=$user->email; $resetUrl = url(route('password.reset', ['token' => $token,'email'=>$email], false)); $user->notify(new CustomResetPasswordNotification($resetUrl,$email)); } );
- In the above code you can see $token is available
- Create a notification class called CustomResetPasswordNotification
- pass the token url($resetUrl ) and the email to the notification class. there you can write the email functionality.
- If you need source code for this , do a comment for this post.
you can write like this below for sending the email: (I am just pasting the toMail method only.)
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)->subject('password reset')->view('emails.forgot_password', ['resetUrl' =>$this->resetUrl,'email'=>$this->email]);
}
Thanks for reading my Post