Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML content type text replies not displaying in Read Email. #76

Open
chris001 opened this issue Jun 1, 2022 · 7 comments
Open

HTML content type text replies not displaying in Read Email. #76

chris001 opened this issue Jun 1, 2022 · 7 comments

Comments

@chris001
Copy link

chris001 commented Jun 1, 2022

This has happened on more than one incoming Reply messages. Sent an email from Usermin with the default text/plain content. The recipient replies with text/html. Their reply message is HTML and appears empty, you see only the original message, wrapped in an html box by their email client, but their text/html message reply is not showing. When you click view raw message, you see, in their multipart text/html, their reply text, with css, is located inside the <head> tag! The original message which they replied to, is formatted inside a box in the <body> tag. Seems to violate the HTML standards regarding do not put content intended to be seen by end users inside the head tag. Is this a standard format for HTML email messages? Should Usermin parse the text from the <head> tag? Possibly related to #58

@chris001
Copy link
Author

chris001 commented Jun 1, 2022

Update: iOS Mail app displays the reply message content hiding in the head tag. So it must be somewhat of a standard algorithm, how exactly to strip away the html tags or whatever, and display the message text no matter what tag it's hiding inside of.

@chris001
Copy link
Author

chris001 commented Jun 3, 2022

Message is readable in the iOS Mail app, yet the message violates HTML standard by storing content (the html formatted reply message) in the <head> tag. Only metadata about the html document, is allowed to be stored in the <head> tag!
IMG_7387

@jcameron
Copy link
Collaborator

jcameron commented Jun 3, 2022

Could you send an email like this to me at jcameron@virtualmin.com ?

I'd like to see the raw message and so figure out why Usermin isn't parsing it properly..

@chris001
Copy link
Author

chris001 commented Jun 3, 2022

OK FYI here's the bug (no head tag text, which is the main content of the message sender's reply) in Usermin on Firefox 102 (latest version) which is a quite conforming to html standards browser. I think the cause of the bug is some anti-standards way of parsing the html before it gets displayed in the email client, so that even text in the head tag, which is normally never shown on web pages, will get shown to the reader of an html email message:
usermin read email html display bug

@chris001
Copy link
Author

chris001 commented Jun 3, 2022

Sent!

@jcameron
Copy link
Collaborator

jcameron commented Jun 3, 2022

Got it, thanks! I'm not sure how to handle this case, since it seems like they are completely off-spec by using the tag.

What mail client is sending these messages? It looks like some ticket system..

@chris001
Copy link
Author

chris001 commented Jun 3, 2022

I don't know which mail client is sending these messages, I could ask, however, the email renders readable in iPhone iOS Apple Mail client on the iPhone, this tells us the Usermin rendering algorithm isn't doing as much as it should to more closely follow all the important render steps used by such popular email reading apps as iOS Apple Mail.

I searched and found a few decent articles about how and why webmail (in particular Gmail) has decided they must filter and rearrange the HTML from the email message body, before outputting it into the browser for display to the user. It's quite a lot of filtering steps! Which they arrived at after many many many improvements over a significant time exposed and used by the masses! One of which involves literally removing the head start and head end tags, exposing any user generated text content inside the head tags to the user reading the email.

Here's one of these articles that lists steps Gmail does to process the HTML email before it outputs to the browser..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants