Laravel 9 Mailable Markdown Render issue #45336
-
I am using laravel 9 and having an issue with the mailable markdown. I created a mail with a markdown content: <x-mail::message>
# Hello {{ $name }},
Please click on the link below to login
<x-mail::panel>
Temporay Password: {{ $password }}
</x-mail::panel>
<x-mail::button :url="$register_url">
Login
</x-mail::button>
Thanks,<br>
{{ config('app.name') }}
</x-mail::message>
Unfortunately, after testing the mail, I get the following: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I just realized that apparently, when the mail markdown is formatted, it gives spaces to the markdown text and components, that's when I get that error. Perhaps we should take a look at this once more as most IDEs will just format the mail so it's worth perhaps noting this in the laravel docs or making a change to reflect the IDE formatting affecting the mail markdown content. This is what I ended up with form my mail markdown after removing the spaces: <x-mail::message>
# Hello {{ $name }},
Please click on the link below to login
<x-mail::panel>
Temporay Password: {{ $password }}
</x-mail::panel>
<x-mail::button :url="$register_url">
Login
</x-mail::button>
Thanks,<br>
{{ config('app.name') }}
</x-mail::message> |
Beta Was this translation helpful? Give feedback.
I just realized that apparently, when the mail markdown is formatted, it gives spaces to the markdown text and components, that's when I get that error. Perhaps we should take a look at this once more as most IDEs will just format the mail so it's worth perhaps noting this in the laravel docs or making a change to reflect the IDE formatting affecting the mail markdown content.
This is what I ended up with form my mail markdown after removing the spaces: