diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-07-12 06:30:51 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-07-12 06:30:51 +0800 |
commit | de180f6cbbabda73d445f802e83e12696bffdab6 (patch) | |
tree | ad2878824db97297218d37243c1c93a75f8d9b7e /camel/providers | |
parent | 2415667b55dc62ef5e7eab157e0dde5ce71a9598 (diff) | |
download | gsoc2013-evolution-de180f6cbbabda73d445f802e83e12696bffdab6.tar gsoc2013-evolution-de180f6cbbabda73d445f802e83e12696bffdab6.tar.gz gsoc2013-evolution-de180f6cbbabda73d445f802e83e12696bffdab6.tar.bz2 gsoc2013-evolution-de180f6cbbabda73d445f802e83e12696bffdab6.tar.lz gsoc2013-evolution-de180f6cbbabda73d445f802e83e12696bffdab6.tar.xz gsoc2013-evolution-de180f6cbbabda73d445f802e83e12696bffdab6.tar.zst gsoc2013-evolution-de180f6cbbabda73d445f802e83e12696bffdab6.zip |
Fixes bug #27672
2002-07-11 Jeffrey Stedfast <fejj@ximian.com>
Fixes bug #27672
* camel-mime-filter-bestenc.c: Conditionally #include <config.h>
* camel-mime-filter-linewrap.c: Same here... although we could
probably just get rid of this filter? We don't seem to use it
anywhere since we try to QP/Base64 encode any text parts with long
lines. Besides, we couldn't use this filter for SMTP anyway since
we can't risk possibly linewrapping a binary mime part. I dunno,
maybe this could be useful in the composer though? *shrug*
* providers/smtp/camel-smtp-transport.c (smtp_data): Always call
camel_mime_message_set_best_encoding() even if the server allows
8BITMIME and even if we don't have any 8bit parts because we may
have parts with long lines (>998 octets) which also need to be
encoded.
* camel-mime-message.c (check_8bit): Don't forget to check for the
binary encoding here as well.
svn path=/trunk/; revision=17428
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/smtp/camel-smtp-transport.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index 7e5eddb6a0..b2b31bb922 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -39,7 +39,6 @@ #undef MIN #undef MAX #include "camel-mime-filter-crlf.h" -#include "camel-mime-filter-linewrap.h" #include "camel-stream-filter.h" #include "camel-smtp-transport.h" #include "camel-mime-message.h" @@ -1137,6 +1136,8 @@ static gboolean smtp_data (CamelSmtpTransport *transport, CamelMimeMessage *message, gboolean has_8bit_parts, CamelException *ex) { /* now we can actually send what's important :p */ + CamelBestencRequired required = CAMEL_BESTENC_GET_ENCODING; + CamelBestencEncoding enctype = CAMEL_BESTENC_BINARY; char *cmdbuf, *respbuf = NULL; CamelStreamFilter *filtered_stream; CamelMimeFilter *crlffilter; @@ -1144,11 +1145,17 @@ smtp_data (CamelSmtpTransport *transport, CamelMimeMessage *message, gboolean ha GSList *h, *bcc = NULL; int ret; - /* if the message contains 8bit mime parts and the server - doesn't support it, encode 8bit parts to the best - encoding. This will also enforce an encoding to keep the lines in limit */ + /* if the message contains 8bit/binary mime parts and the server + doesn't support it, set our required encoding to be 7bit */ if (has_8bit_parts && !(transport->flags & CAMEL_SMTP_TRANSPORT_8BITMIME)) - camel_mime_message_encode_8bit_parts (message); + enctype = CAMEL_BESTENC_7BIT; + + /* FIXME: should we get the best charset too?? */ + /* Changes the encoding of any 8bit/binary mime parts to fit + within our required encoding type and also force any text + parts with long lines (longer than 998 octets) to wrap by + QP or base64 encoding them. */ + camel_mime_message_set_best_encoding (message, required, enctype); cmdbuf = g_strdup ("DATA\r\n"); |