Can I write plain HTML in a markdown blade file?
I created a Markdown Mailable using php artisan make:mail OrderShipped --markdown=emails.orders.shipped
In the blade file itself, shipped.blade.php can I delete all the content and write plain HTML instead of using the components method?
Yes, you can write plain HTML in a Markdown blade file. Simply delete the default content and write your HTML code as you normally would.
Here's an example of a Markdown blade file with plain HTML:
@component('mail::message')
# Hello!
<p>This is a plain HTML paragraph.</p>
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
@endcomponent
Note that you can still use Markdown syntax within the HTML code if you prefer.
bear in mind that you cannot just write ANY html
Email clients are stuck in the days when layout was done with tables - you can't go using flex box for instance
The components that come with Laravel have been written with these limitations in mind
@Snapey Haha I wish I saw your message earlier, I made a great flex layout.. then in the email I got plain text šš.
So I should stick to tables I assume, just like Laravel's components are. I hope I remember how to style them lol
Please or to participate in this conversation.