Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

martinszeltins's avatar

How to customize the forgot password email?

I would like to customize the default forgot password email view but I could not find how to. Do I need to publish something from the vendor? The one that says:

Hello!
You are receiving this email because we received a password reset request for your account.

Reset Password
This password reset link will expire in 60 minutes.

If you did not request a password reset, no further action is required.

Regards,
Laravel

If you’re having trouble clicking the "Reset Password" button, copy and paste the URL below into your web browser: http://localhost:41166/reset-password/00fda48c93f6d43db4e348f6a813ae4fdb688ceaa462bc9d?email=jeff248@gmail.com

It gets sent when using Password::sendResetLink($email);

0 likes
10 replies
martinszeltins's avatar

@snapey I was more looking to change the layout itself (like replacing Laravel logo with my own)

Snapey's avatar

The logo is not hard coded.

What version are you on?

bestmomo's avatar

Do you want to change only the text or also the template ?

Snapey's avatar
Snapey
Best Answer
Level 122

if you run php artisan vendor:publish and then choose laravel-mail

Then in resources/views/vendor/mail/html you will see a header.blade.php file.

which contains

@if (trim($slot) === 'Laravel')
<img src="https://laravel.com/img/notification-logo.png" class="logo" alt="Laravel Logo">
@else
{{ $slot }}
@endif

which says if the header slot contains 'laravel' then show the laravel logo, else, whatever is in the slot.

At the top of message.blade.php you will see

@component('mail::layout')
{{-- Header --}}
@slot('header')
@component('mail::header', ['url' => config('app.url')])
{{ config('app.name') }}
@endcomponent
@endslot

This is where the header is used, and in the slot is {{ config('app.name') }} , ie, your app name from the config.

You can replace this line in the message.blade.php file to include your own logo and/or product name.

3 likes
martinszeltins's avatar

@snapey Oh, so that's how it works! Thanks, I was able to change the email template after publishing laravel-mail

imad_bk's avatar

hey @snapey i did what you said and i got a problem with the link , he sent only the token like that :

If you're having trouble clicking the "Reset Password" button, copy and paste the URL below into your web browser: 9e990c13f8e99bdbbad86f84dec826b720d6f2e496b19dd358648ee9609803a2

can you help me please ?

Tray2's avatar

@imad_bk Open your own thread instead of highjacking an old one, that way you will get help faster and someone with the same issue as you can find it

arzeljrz's avatar

hello when i change the logo in my gmail reset link the logo did not appear

Please or to participate in this conversation.