Bug 118708 - KMail ignores the Content-Type: multipart/alternative header
Summary: KMail ignores the Content-Type: multipart/alternative header
Status: RESOLVED DUPLICATE of bug 187989
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-20 12:45 UTC by Dan
Modified: 2009-07-27 00:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Message source (62.69 KB, text/plain)
2005-12-20 12:46 UTC, Dan
Details
How Thunderbird displays the message (160.56 KB, image/png)
2005-12-20 12:48 UTC, Dan
Details
The top of the message in KMail (90.63 KB, image/png)
2005-12-20 12:49 UTC, Dan
Details
KMail renders the HTML part after the text part (134.98 KB, image/png)
2005-12-20 12:51 UTC, Dan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2005-12-20 12:45:43 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Fedora RPMs
OS:                Linux

I get messages from a mailing list that are sent as both HTML and text (with a Content-Type: multipart/alternative header). KMail displays both (text AND HTML), even though it should display only one (if "Prefer HTML to Plain Text" is set, then the HTML part should be displayed, otherwise the text part).
Comment 1 Dan 2005-12-20 12:46:44 UTC
Created attachment 13992 [details]
Message source
Comment 2 Dan 2005-12-20 12:48:28 UTC
Created attachment 13993 [details]
How Thunderbird displays the message
Comment 3 Dan 2005-12-20 12:49:24 UTC
Created attachment 13994 [details]
The top of the message in KMail
Comment 4 Dan 2005-12-20 12:51:17 UTC
Created attachment 13995 [details]
KMail renders the HTML part after the text part
Comment 5 Thiago Macieira 2005-12-20 14:01:01 UTC
I can confirm this, but only for this particular message. I've tried with other HTML-formatted emails I've received and I had no such problem.

My analysis indicates that the problem is caused by the fact that the email is structured as follows:
 - multipart/alternative with two parts:
   1) text/plain
   2) multipart/related, with several parts:
      a) text/html
      b) other images

Whereas HTML email I've received that works has:
 - multipart/related with several parts:
   1) multipart/alternative, with two parts:
      a) text/plain
      b) text/html
   2) other images
Comment 6 Dan 2005-12-20 14:45:03 UTC
Then I guess this report should be elevated to bug (I thought the multipart feature wasn't implemented at all, that's why it's a whishlist).
Comment 7 Thiago Macieira 2005-12-20 14:53:59 UTC
Agreed.
Comment 8 Jens 2006-01-06 14:09:43 UTC
Yes, I also second this bug. Many HTML mails are structured in the way mentioned first in comment #5. Also, currently KMail displays all attached images that are used _within_ the HTML mail _again_ under the mail text, which is also not necessary.

If "Prefer HTML to text" is activated the HTML part should be displayed with all attached images inline and only those not used in the HTML code shown as attachments. If "Prefer HTml to text" is not activated, KMail should hide the HTML part, and the images used in the HTML part, completely in the message display and only show them in the MIME tree view, if at all.

It would be great if this could be fixed.
Thanks :)

Jens
Comment 9 Reto Bachmann-Gmür 2006-03-05 03:21:37 UTC
When a multipart/alternative section has a part other than text or html (seen with an application/rdf+xml part) and "Prefer HTML to text" is not activated this part is shown like an attachment (labeled "unnamed") in the main-message view, this part should be visible only in mime-tree view.
Comment 10 Jörg Hermsdorf 2006-03-05 19:56:44 UTC
When you receive a multipart/alternative message it depends on the "Prefer HTML to text" security-setting which part is displayed by default. I think there are two different things mixed up.
1st thing: a security setting - render a html-part by default or display the html source code
2nd thing: a priority list which part of multipart/alternative messages should be displayed by default

I don't like the way how this two things are mixed up currently. I would like to have a priority list where I can setup which part of multipart/alternative messages is displayed by default (html, text, xml, or what else is there...). And I would like to have the "Prefer HTML to text" security setting being renamed to "Always render HTML messages by default".
I do prefer HTML to text messages, but I don't want them to be rendered by default due to security concerns.
Comment 11 Jim Dabell 2007-03-24 21:43:23 UTC
I've just recently started bumping into this bug as well.  Right now, if you need to support KMail, you either have to drop plaintext (not good for the people who prefer plaintext), or drop embedded images (not friendly or reliable).  Comment #5 seems to be spot on in its description of the problem.
Comment 12 Thomas McGuire 2009-07-27 00:43:57 UTC
I've just fixed this, see bug 187989 (didn't realize that we have two bug reports for this)

> Comment #5 seems to be spot on in its description of the problem.

Of course it is spot on, it is from Thiago after all :)

*** This bug has been marked as a duplicate of bug 187989 ***