I'm quite new to Laravel, but have recently taken over a project from someone and trying to get the mail blade templates to render but I am having problems.
The code used for the enquiry email template is as follows:
@component('mail::message')
#New customer enquiry
We have received a new customer enquiry.
@component('mail::table')
| **Name** | **Email** | **Telephone** |
| ---------------------------------------------- |:---------------------:| -----------------------:|
| {{$enquiry->firstname}} {{$enquiry->lastname}} | <{{$enquiry->email}}> | {{$enquiry->telephone}} |
@endcomponent
Thanks,<br>
{{ config('app.name') }}
@endcomponent
But the table always renders as raw HTML, here is a screenshot of how the email looks in MailCatcher:

I've checked a couple of other posts that concern this kind of issue but usually it's due to the attempt to render more than one table in a mail template, but this is just a single table. Is there a component I have missed or is it just MailCatcher not rendering correctly?
When using Markdown to render emails, avoid using indents excessively. Your code should look like this
@component('mail::message')
#New customer enquiry
We have received a new customer enquiry.
@component('mail::table')
| **Name** | **Email** | **Telephone** |
| ---------------------------------------------- |:---------------------:| -----------------------:|
| {{$enquiry->firstname}} {{$enquiry->lastname}} | <{{$enquiry->email}}> | {{$enquiry->telephone}} |
@endcomponent
Thanks,<br>
{{ config('app.name') }}
@endcomponent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With