2

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
  • 580
  • 11
  • 24

2 Answers2

12

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
  • 121
  • 1
  • 4
3

This just worked for me

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

You can view a good answer here.