Now that flarum core supports group mentions, I noticed the email format is not formatting properly and is just one long string of plain text (but still contains my custom html header/footer) while new emails triggered via tag following do format properly and consist of formatted code blocks, headers, etc. Also, I see user notifications have their own template defined in fof/prettymail while group mentions do not which may be another slight difference.
Any idea why there would be a difference in the email formatting between the group mentions & tag subscriptions? I suspect both group mentions, and tag subscriptions both use the default template so I would expect HTML formatting to work the same?
I see here in the linked code @IanM that the post would appear to be formatted, but this is also in the 2.x branch so I am wondering if it's missing in 1.X or just located in a different area and I'm hitting a different issue?
{!! $blueprint->post->formatContent() !!}
flarum/frameworkblob/2.x/extensions/mentions/views/emails/html/groupMentioned.blade.php
Edit :
Now that I think about it, I checked an older @group mention email from a few months back and it was formatted properly. My fof/prettymail templates never changed, maybe just minor flarum upgrades since then.
Are there any conditions where if formatting fails it will fallback to plaintext? And anyway I could debug that, the emails triggered via Queue were all successful and I don't see any flarum logs today in storage/logs that could highlight any errors.
Both emails have code blocks, headers, links, emojis... the only difference may be inclusion of some embedded images in the email and also a table in the email which formatting did not work.
Update:
Found part of the problem.
Works
Authorization: Bearer token
Doesnt work - Breaks email formatting (ie. <> are bad)
Authorization: Bearer <token>
When I added the rest of my post content back and triggered, it broke again. I went through the same process and discovered this time it was the markdown tables breaking it. I can work around both of these, though tables in emails would be especially nice to have to keep things neat and tidy. Since this is an external extension providing the tables, does that mean it would probably not be possible to have formatted in emails?
https://discuss.flarum.org/d/26456-markdown-tables
On the topic of group mentions, it would be nice to have a custom email template like other supported templates, and also customize the subject line.