]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Some message/rfc822 mails were returned as text/plain
authorTimo Sirainen <tss@iki.fi>
Wed, 6 Aug 2003 14:39:04 +0000 (17:39 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 6 Aug 2003 14:39:04 +0000 (17:39 +0300)
--HG--
branch : HEAD

src/lib-imap/imap-bodystructure.c

index 3aa2fbadd1437361d3ad099f47c57b031c30c62d..f3b34e12f68f43dc5ca25f4e4c36ab866497859c 100644 (file)
@@ -380,18 +380,23 @@ static void part_write_body(struct message_part *part,
                data = t_new(struct message_part_body_data, 1);
        }
 
-       /* "content type" "subtype" */
-       str_append(str, NVL(data->content_type, "\"text\""));
-       str_append_c(str, ' ');
-       if (data->content_subtype != NULL)
-               str_append(str, data->content_subtype);
+       if (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822)
+               str_append(str, "\"message\" \"rfc822\"");
        else {
-               if (data->content_type == NULL ||
-                   strcasecmp(data->content_type, "\"text\"") == 0)
-                       str_append(str, "\"plain\"");
-               else
-                       str_append(str, "\"unknown\"");
+               /* "content type" "subtype" */
+               str_append(str, NVL(data->content_type, "\"text\""));
+               str_append_c(str, ' ');
+
+               if (data->content_subtype != NULL)
+                       str_append(str, data->content_subtype);
+               else {
+                       if (data->content_type == NULL ||
+                           strcasecmp(data->content_type, "\"text\"") == 0)
+                               str_append(str, "\"plain\"");
+                       else
+                               str_append(str, "\"unknown\"");
 
+               }
        }
 
        /* ("content type param key" "value" ...) */