aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--em-format/e-mail-parser-message.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/em-format/e-mail-parser-message.c b/em-format/e-mail-parser-message.c
index a761f4bd53..5f7f8a94d0 100644
--- a/em-format/e-mail-parser-message.c
+++ b/em-format/e-mail-parser-message.c
@@ -88,6 +88,20 @@ empe_message_parse (EMailParserExtension *extension,
ct = camel_mime_part_get_content_type (part);
mime_type = camel_content_type_simple (ct);
+ if (mime_type && g_ascii_strcasecmp (mime_type, "message/rfc822") == 0) {
+ /* get mime type of the content of the message,
+ instead of using a generic message/rfc822 */
+ CamelDataWrapper *content;
+
+ content = camel_medium_get_content (CAMEL_MEDIUM (part));
+ if (content) {
+ ct = camel_data_wrapper_get_mime_type_field (content);
+
+ g_free (mime_type);
+ mime_type = camel_content_type_simple (ct);
+ }
+ }
+
/* Actual message body */
parts = g_slist_concat (parts, e_mail_parser_parse_part_as (
parser, part, part_id, mime_type,