jeudi 22 décembre 2016

Laravel 5.3 add html to MailMessage->line

I like to add some html tags to the body of my mail using MailMessage like this:

$mailMessage = new MailMessage();
$mailMessage->line(trans('mail.someLine') );

In mail.php:

'someLine' => 'Bla bla <a href="html://someurl">http://htmlsomeurl</a>'

But in the actual mail the entire line comes out as plain text.

I've tried to use html_entity_decode but without any success:

 $mailMessage->line(html_entity_decode(trans('mail.someLine')));

Seems like the line method does it's own encoding. Is there a workaround for this?

ps The rest of the mail has proper html so that's not the point!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire