79159596

Date: 2024-11-05 14:57:52
Score: 1
Natty:
Report link

As the laravel doc states:

Do not use excess indentation when writing Markdown emails. Per Markdown standards, Markdown parsers will render indented content as code blocks.

Remember that markdown will be interpreted spaces are blocks, - are lists, * is bold, etc.

I just stumbled upon the same issue and my fix was to eliminate indentation and empty lines in the content itself. like

@component('mail::message')
    <h3 >
    You registered at {{ $site_mame }}
    </h3>
    Best regards, <br>
    ...
@endcomponent

In my more complex example I had to do it that way:

@component('mail::message')
    <h2>Hello {{$body['name']}},</h2>
    <p>Cron {{$body['cronname']}} was successfully executed</p>
    <div>
    @foreach ($body['alerts'] as $alerts)
    <div>
    @foreach ($alerts as $alert)
    @foreach ($alert as $al)
    <p>{!! $al !!}</p>
    @endforeach
    @endforeach
    </div>
    @endforeach
    </div>
    <h3>Overview</h3>
    ...
@endcomponent
Reasons:
  • Blacklisted phrase (0.5): Best regards
  • Blacklisted phrase (1): regards
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Canelo Digital