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

Ligonsker's avatar

Customizing Breeze Emails

Hello,

I wanted to customize the Email sent by Breeze from the default styles. Looks like installation does not publish the fles for that but I found online that using php artisan vendor:publish --tag=laravel-notifications will publish the email files, and it did, although looks like it did not publish all the necessary files.

It only published /vendor/notifications/email.blade.php, with the following code, but looks like other things are missing like the components themselves such as the x-mail::button?

<x-mail::message>
{{-- Greeting --}}
@if (! empty($greeting))
# {{ $greeting }}
@else
@if ($level === 'error')
# @lang('Whoops!')
@else
# @lang('Hello!')
@endif
@endif

{{-- Intro Lines --}}
@foreach ($introLines as $line)
{{ $line }}

@endforeach

{{-- Action Button --}}
@isset($actionText)
<?php
    $color = match ($level) {
        'success', 'error' => $level,
        default => 'primary',
    };
?>
<x-mail::button :url="$actionUrl" :color="$color">
{{ $actionText }}
</x-mail::button>
@endisset

{{-- Outro Lines --}}
@foreach ($outroLines as $line)
{{ $line }}

@endforeach

{{-- Salutation --}}
@if (! empty($salutation))
{{ $salutation }}
@else
@lang('Regards'),<br>
{{ config('app.name') }}
@endif

{{-- Subcopy --}}
@isset($actionText)
<x-slot:subcopy>
@lang(
    "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\n".
    'into your web browser:',
    [
        'actionText' => $actionText,
    ]
) <span class="break-all">[{{ $displayableActionUrl }}]({{ $actionUrl }})</span>
</x-slot:subcopy>
@endisset
</x-mail::message>

How can I customize that? The buttons for example? Because looks like this template is working for all the types of emails (welcome, verification, password-reset), so I can't just replace the contents with my code but I somehow need only to change the styles

Ty

0 likes
3 replies
Ligonsker's avatar

Update:

I found the buttons and their css sheets!

I had to publish "mail" as well.

But I also noticed it published two folders with identical files - one folder called html and the second is called text.

I checked and it sends emails using the files in the html folder

Then what is the text folder for?

Sinnbeck's avatar

@Ligonsker All mail has a text version as well, in case the user does not allow showing the message as html. Most mail test systems has a preview function for both :)

1 like
Ligonsker's avatar

@Sinnbeck Oh I see! But if it sending the html version - where is it being set? How do I set it to send the text version?

Please or to participate in this conversation.