Support the ongoing development of Laravel.io →
posted 7 years ago
Mail
Last updated 2 years ago.
0

I've encountered the same today. The problem was that the indentation of the email template file caused markdown to add <code> tags around stuff, thus escaping it. You can tell whether this is the case by checking the "HTML Source" tab in mailtrap.

The issue for me was with the (published version of this) file: https://github.com/laravel/framework/blob/5.4/src/Illuminate/Notifications/resources/views/email.blade.php

0

Hi Ben! Thanks for your answer. How did you manage to fix this? It's also in mailtrap; Do you think this won't happen in live mail accounts?

0

notflip said:

Hi Ben! Thanks for your answer. How did you manage to fix this? It's also in mailtrap; Do you think this won't happen in live mail accounts?

Oh, seems I was overzealous with my editing.

The fix for me was to make sure that there was no indentation in that file (the blade parts), because indentation will lead markdown to assume it is code, since it uses 4 spaces for that.

And no, barring some freak exceptions, it won't be fixed in live mail accounts because the problem occurs as soon as markdown parses it into html.

Last updated 7 years ago.
0

Does the plain text version works for you? HTML works fine for me, but the plain text counterpart is just the Markdown. I'd have expected the Markdown stuff to be stripped away.

0

It's the markdown version yea, but I haven't looked into that yet.

0

Don't use tabs or spaces in your template

0

@ben-joostens - Just wanted to say thanks. I'd gone from a working email to a broken one after several changes and couldn't figure what was wrong. After reading your answer I realised my editor had "nicely formatted" my component code when I copied and pasted. Thanks.

0

I just had the same problem using laravel v5.6.26.

It was fixed by reinstalling composer packages...

0

@ben-joostens Thanks mate, saved my backside!!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

notflip notflip Joined 2 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.