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
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?
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.
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.
It's the markdown version yea, but I haven't looked into that yet.
@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.
I just had the same problem using laravel v5.6.26.
It was fixed by reinstalling composer packages...
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community