Search code examples
laravellaravel-9

Line breaks not working properly with Laravel Text Emails / Testing in Mailhog


If I understood correctly, in laravel text emails it is not necessary to add "\n" for example,

but it seems that, some times the "enters" ( new lines ) I add work properly, sometimes not.

I've been trying to figure it out anc it is a mystery, seen some people with the same issue but haven't found a solution yet.

Some examples/tests below:

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here

Edit:

HTML is not being used! I'm calling ->text( and not->view(:

enter image description here enter image description here


Solution

  • Added 2 spaces BEFORE the line break, Issue solved. Make sure your IDE is not trimming spaces at the end!! Which was my case with VSCode ( not sure if some plugin or native will figure out soon )