From bd19a9d79d73216721b8409b65be9bfc9928f12c Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 5 Jun 2001 12:37:31 +0000 Subject: make HTML and plain mails to have the same boundary 2001-06-05 Radek Doulik * mail-format.c: make HTML and plain mails to have the same boundary svn path=/trunk/; revision=10115 --- mail/mail-format.c | 49 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 13 deletions(-) (limited to 'mail/mail-format.c') diff --git a/mail/mail-format.c b/mail/mail-format.c index d7d66bed49..a4e3f80fd8 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -169,8 +169,10 @@ mail_format_mime_message (CamelMimeMessage *mime_message, MailDisplay *md) free_data_urls); } + mail_html_write (md->html, md->stream, "\n\n"); write_headers (mime_message, md); format_mime_part (CAMEL_MIME_PART (mime_message), md); + mail_html_write (md->html, md->stream, "\n\n"); } @@ -516,9 +518,12 @@ attachment_header (CamelMimePart *part, const char *mime_type, return; /* Start the table, create the pop-up object. */ - mail_html_write (md->html, md->stream, "
" - "" - "", + mail_html_write (md->html, md->stream, + "" + "" + "" + "" + "
", get_cid (part, md), mime_type); /* Write the MIME type */ @@ -551,7 +556,9 @@ attachment_header (CamelMimePart *part, const char *mime_type, } #endif - mail_html_write (md->html, md->stream, "
"); + mail_html_write (md->html, md->stream, + "
" + "
\n"); } static gboolean @@ -784,7 +791,11 @@ write_headers (CamelMimeMessage *message, MailDisplay *md) gboolean full = GPOINTER_TO_INT (g_datalist_get_data (md->data, "full_headers")); mail_html_write (md->html, md->stream, - "" + "" + "" + "" + "
" + "
" "
" "" @@ -809,7 +820,9 @@ write_headers (CamelMimeMessage *message, MailDisplay *md) camel_medium_free_headers (CAMEL_MEDIUM (message), gheaders); mail_html_write (md->html, md->stream, - "
"); + "" + "
" + "\n"); } static void @@ -904,7 +917,9 @@ handle_text_plain (CamelMimePart *part, const char *mime_type, if (format && !g_strcasecmp (format, "flowed")) return handle_text_plain_flowed (text, md); - mail_html_write (md->html, md->stream, "\n\n 
\n"); + mail_html_write (md->html, md->stream, + "\n\n" + "
\n"); /* Only look for binhex and stuff if this is real text/plain. * (and not, say, application/mac-binhex40 that mail-identify @@ -946,6 +961,8 @@ handle_text_plain (CamelMimePart *part, const char *mime_type, mail_text_write (md->html, md->stream, "%s", p); g_free (text); + mail_html_write (md->html, md->stream, "
\n"); + return TRUE; } @@ -957,7 +974,8 @@ handle_text_plain_flowed (char *buf, MailDisplay *md) guint32 citation_color = mail_config_get_citation_color (); mail_html_write (md->html, md->stream, - "\n\n 
\n\n"); + "\n\n" + "
\n\n"); for (line = buf; *line; line = eol + 1) { /* Process next line */ @@ -1022,7 +1040,8 @@ handle_text_plain_flowed (char *buf, MailDisplay *md) } g_free (buf); - mail_html_write (md->html, md->stream, "\n"); + mail_html_write (md->html, md->stream, "\n
\n"); + return TRUE; } @@ -1493,7 +1512,7 @@ handle_text_html (CamelMimePart *part, const char *mime_type, static gboolean handle_image (CamelMimePart *part, const char *mime_type, MailDisplay *md) { - mail_html_write (md->html, md->stream, "", + mail_html_write (md->html, md->stream, "", get_cid (part, md)); return TRUE; } @@ -1514,13 +1533,15 @@ handle_multipart_mixed (CamelMimePart *part, const char *mime_type, nparts = camel_multipart_get_number (mp); for (i = 0; i < nparts; i++) { if (i != 0 && output) - mail_html_write (md->html, md->stream, "
\n"); + mail_html_write (md->html, md->stream, + "
" + "
\n"); part = camel_multipart_get_part (mp, i); output = format_mime_part (part, md); } - + return TRUE; } @@ -1594,7 +1615,9 @@ handle_multipart_signed (CamelMimePart *part, const char *mime_type, nparts = camel_multipart_get_number (mp); for (i = 0; i < nparts - 1; i++) { if (i != 0 && output) - mail_html_write (md->html, md->stream, "
\n"); + mail_html_write (md->html, md->stream, + "
" + "
\n"); part = camel_multipart_get_part (mp, i); -- cgit v1.2.3