Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ruinobreferreira's avatar

Line break in plain text email

Hi,

I'm trying to send a plain text email with some info. The problem here is that sometimes the line breaks correctly and other times don't. I tried to force it with \r\n but Laravel assumes it as a regular text and prints "\r\n"

I'm using Sublime Text 3 and the line endings are set to Unix.

Thank you.

0 likes
4 replies
bobbybouwmann's avatar

You need to print the tekst with the correct tags if you use html in your emails

{!! $text !!}
1 like
ruinobreferreira's avatar

I'm not doing any HTML but I need the {!! !!} for the special characters like áéíõ(...)

I'm doing this:

{!! trans('fields.companies.name') !!}: {!! $request->name !!}
{!! trans('fields.companies.industry') !!}: {!! $request->industry !!}

And the output is:

Name: ACME Industry: IT

ruinobreferreira's avatar
Level 4

Simple solution... I added at least two spaces before the line break.

liamvictor's avatar

Two spaces before a line break is a markdown thing. There's got to be a connection that brighter minds than I can understand.

Please or to participate in this conversation.