I send an email out via the toMail
channel, which is saved from a text area where I hit enter twice for new line, so it looks like this in the input:
Line 1
Line 2 with space above and below
Line 3
When I use that text in the mail like this:
return (new MailMessage)->subject('test spacing')
->line($this->text);
It looks like this in the email:
Line 1 Line 2 with space above and below Line 3
I changed the relevant section in email.blade.php
from:
@foreach ($introLines as $line)
@endforeach
To:
@foreach ($introLines as $line)
{!! nl2br(htmlspecialchars($line)) !!}
@endforeach
But that still didn't work. In the notifications
table in the db, it is saved as:
Line 1\n\nLine 2 with space above and below\n\nLine 3
Any idea how to get the sent email to show the spacing so it's not just one big blob?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2nnLQZb
via IFTTT
Aucun commentaire:
Enregistrer un commentaire