Bug 356517

Summary: Message window displays no content for multipart HTML emails with empty text/plain section when HTML is not preferred over "text-only"
Product: [Applications] kmail2 Reporter: Oliver Kurz <okurz>
Component: message listAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: dav1dblunk3tt, kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://paste.kde.org/pfrbri6qy
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Oliver Kurz 2015-12-11 15:30:57 UTC
== observation ==
multipart emails with HTML content and no text content do not display anything in the message window

Reproducible: Always

Steps to Reproduce:
1. receive/load multipart email
2. observe blank message window
3. selecting "Prefer HTML over text" in kmail->security settings causes the HTML version of the email to properly display

Actual Results:  
blank message window displayed

Expected Results:  
different options:
 1. html version displayed instead
 2. notification about empty text/plain section is displayed
 3. text is automagically rendered from HTML content
 4. raw HTML content is dumped instead

also see https://litmus.com/blog/best-practices-for-plain-text-emails-a-look-at-why-theyre-important
Comment 1 davidblunkett 2017-01-30 10:14:45 UTC
I appear to have this problem and it is very annoying.

One "fix" is to enable the message structure pane, the other to switch preferences in the security panel both of which are super clunky and undesirable.
Comment 2 sedrubal 2017-10-14 17:54:00 UTC
Another problem is, that one html mime part with global style can also change an other mime part (even if it is a text/plain mime part).

Use case: mailman sends plain text emails to ask list admins for approval and attaches the original email. If this is a malicious html email, it can manipulate the mailman mail.

May using iframes for every mime part be a solution?
Comment 3 Justin Zobel 2022-11-10 08:51:55 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Oliver Kurz 2022-11-11 12:40:37 UTC
I can't reproduce the problem in version 5.20.3 (22.04.3) so assuming fixed.