Closed apezio closed 9 months ago
Screenshot 1: Message first viewed (prefer plaintext over html option enabled in Settings).
Screenshot 2: "View HTML Message"
Screenshot 3: "View plain text Message"
When you look at the source of the email, you will notice that there is an empty Content-Type: text/plain
part in there.
This means the sender screwed up the sending of their emails. You should report to them.
Nope. I checked 10 emails with this issue (about 1/4 of the email I receive has this issue) and none have Content-Type: text/plain
.
Edit: the error below is from a browser extension: "DarkReader". Disabling it has no effect on the Snappymail issue.
I do see this error in Safari's JavaScript Console:
Refused to execute a script because its hash or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy
Maybe they are related? (Edit: Nope)
Example email would be something simple like this:
<headers here>
<!DOCTYPE html>
<html here>
</body>
</html>=
Happens in Safari 14.1.2 and Opera 97.0.4719.63. I don't feel like it's a browser thing.
in class bodyText there are 5 different text-part plain's, 4 are hidden and one is shown.
The hidden ones seems to be the bodies of other emails, while this one is for the current email:
<div id="rl-msg-0ae22688dee4e88e49646957b8bf67f1" class="b-text-part plain"></div>
This happens with every HTML-only email, unfortunately it's not the sender(s) email format. :)
To properly understand the issue, we need to investigate the source of the emails.
For example, here's a multipart with html and plain:
Content-Type: multipart/alternative;
boundary="----=_Part_113431976_1099401662.1699967195390"
------=_Part_113431976_1099401662.1699967195390
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hey=20
there,
------=_Part_113431976_1099401662.1699967195390
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.=
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
For example, here's an html only:
Content-Type: text/html; charset="UTF-8"
<html dir=3D"ltr" lang=3D"en">=0A=0A <head>=0A <meta http-equiv=3D"Cont=
SnappyMail should show these properly and have a toggle button. If the body of the converted html to plain is empty, we need to figure out why your browser fails.
Once I select "view as plain text" in the hamburger menu, the converted message shows.
But before that, the body is blank. (When Prefer Plain text is set in settings)
I will upload a few email sources if you want to see.
Tried Chrome 110.0.5481.100. Same issue.
Thanks, that fixed it!
When "Prefer HTML to plain text" is unchecked, and the message being viewed is HTML only, no message is displayed.
I would expect there to be logic that would show the HTML message if there is no plain text.
To reproduce:
Uncheck "Prefer HTML to plain text" in Settings. Go to any mailbox and view an html-only message. it will be blank. The "View HTML Message" option on the hamburger dropdown will correctly show the message.
NOTE:
Once "View HTML Message" option is selected - upon returning to plain text view there is a stripped down version of the HTML message displayed.
Latest git source. Dovecot Safari, Opera, Google Chrome. standalone mode.