Bug 321669

Summary: multipart mails incompletely displayed
Product: [Applications] kmail2 Reporter: jms.daley
Component: UIAssignee: kdepim bugs <kdepim-bugs>
Status: CONFIRMED ---    
Severity: normal CC: 2Kmm, dnt500, freddie_chopin, kdebugs, kdenis
Priority: NOR    
Version: 5.8.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: problematic email that doesn't display correctly in KMail

Description jms.daley 2013-06-27 12:29:10 UTC
I have recently been receiving from Sky, emails which say only "No Content".

These have a content type : multipart/alternative;boundary="======vzjJC8QCEwt1UGGoCcf2vg======"

The body of the message contains the following:

--======vzjJC8QCEwt1UGGoCcf2vg======
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="iso-8859-1"

No content
--======vzjJC8QCEwt1UGGoCcf2vg======
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="iso-8859-1"

<html xmlns=3D"http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" />
.
.
.
.
--======vzjJC8QCEwt1UGGoCcf2vg======--

Only the "No content" displays not the HTML.  The text part of the HTML is visible if I attempt to edit the email.
Could this be a result of fixing bug #318182?


Reproducible: Always
Comment 1 Freddie Chopin 2015-08-20 06:38:02 UTC
Created attachment 94128 [details]
problematic email that doesn't display correctly in KMail

I'm seeing the same issue, mostly with advertisements and spam, but it's there... I'm using KMail 4.14.10 on Arch Linux. I attach an email that shows only "Dear Manager," when viewed in KMail, while there should be quite a lot of text which is in the HTML part. I only removed my e-mail address, other than that the message is not altered.

--- >8 --- >8 --- >8 --- >8 --- >8 --- >8 --- >8 ---

Content-Type: multipart/alternative; 
	boundary="----=_Part_163635_587270.1440035834635"
...

 This is a multi-part message in MIME format.
------=_Part_163635_587270.1440035834635
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: base64

RGVhciBNYW5hZ2VyLAo=

------=_Part_163635_587270.1440035834635
Content-Type: text/html;charset=utf-8
Content-Transfer-Encoding: base64

PEhUTUw+PG1ldGEgaHR0cC1lcXVpdj0iY29udGVudC10eXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7
Y2hhcnNldD1VVEYtOCIgLz48Qk9EWT48cD4NCgk8c3BhbiBzdHlsZT0iY29sb3I6IzAwMDAwMDsi
PjxzcGFuIHN0eWxlPSJmb250LXNpemU6MTRweDsiPjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTp0
...
Comment 2 tony den haan 2016-10-25 18:52:41 UTC
having "prefer HTML to text" disable, in mails from linkedin i get shown the text/plain bit, and i do NOT get prompted to view as html at all.

Content-Type: multipart/alternative; 
	boundary="----=_Part_407749_1450955812.1477409344306"
------=_Part_407749_1450955812.1477409344306
Content-Type: text/plain;charset=UTF-8
..text stuff
------=_Part_407749_1450955812.1477409344306
Content-Type: text/html;charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-ID: html-body
htmlstuf
Comment 3 tony den haan 2016-10-25 18:53:32 UTC
exactly the same problem with jobbsquare, btw
Comment 4 tony den haan 2016-10-27 09:55:25 UTC
It definitely looks like the problem is the order in which content is placed in the mail, if Content-type: text/html comes after the text/plain part, HTML is not detected and the plain text bit is shown.
Comment 5 Rawk 2018-05-28 17:53:11 UTC
I'm having exactly the same issue with mails sent via Google Docs on KMail 5.8.1. "Prefer HTML to plain text" is disabled. KMail should show the plain text by default, but offer to switch to HTML in the mail view.
Comment 6 Denis Kurz 2018-07-20 17:43:16 UTC
Rawk, which version did you experience this with? Iirc, we closed all bugs only reported against version 4.14 or older a while ago. Bugs in those versions will definitely not be fixed.
Comment 7 Rawk 2018-07-22 17:50:32 UTC
Dennis, as I've written in my comment it used to be KMail 5.8.1 at that time, now it is 5.8.3. Currently the best way to handle those multipart messages is to show the message structure (menu "Message") and click on the HTML part.
Comment 8 Denis Kurz 2018-07-22 19:27:16 UTC
Oh man, now I wonder how I could miss that. I'm sorry.