3

I do not want to create a new markdown file, only to include a line break in salutation "without a paragraph".

I tested everything:

->salutation("Atenciosamente,\n\n{$app}")
->salutation("{!! 'Atenciosamente,<br>' !!}{$app}")
->salutation(nl2br(e('Atenciosamente, <br>')). "{$app}")
...

The simplest solution:

To have a line break without a paragraph, you will need to use two trailing spaces with one enter.

enter image description here

Magno Alberto
  • 628
  • 14
  • 27

2 Answers2

21

To break line in MailMessage or add any html, use this code:

use Illuminate\Support\HtmlString;

...

return (new MailMessage)
->line(new HtmlString("Atenciosamente,<br><br>{$app}"));
Koe Kaverna
  • 330
  • 2
  • 5
4

This just worked for me

...
->salutation("\r\n\r\n Regards,  \r\n Support.");

You can view a good answer here.

  • this solution only works when used inside salutation and does not work in any other cases like greetings,line etc. just for the info – Prakhar Gyawali May 05 '23 at 12:10