aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorDavid Liang <dliang@novell.com>2009-08-31 19:07:00 +0800
committerMilan Crha <mcrha@redhat.com>2009-08-31 19:07:00 +0800
commitcd0112576878cb5de3930835ff09f1562e9f5c10 (patch)
treed66481c80520b63b6f32452ab6ccd29f0a4ff606 /composer
parent1d64a0655a529b6bdbb0e0b4d67a91149f0603f1 (diff)
downloadgsoc2013-evolution-cd0112576878cb5de3930835ff09f1562e9f5c10.tar
gsoc2013-evolution-cd0112576878cb5de3930835ff09f1562e9f5c10.tar.gz
gsoc2013-evolution-cd0112576878cb5de3930835ff09f1562e9f5c10.tar.bz2
gsoc2013-evolution-cd0112576878cb5de3930835ff09f1562e9f5c10.tar.lz
gsoc2013-evolution-cd0112576878cb5de3930835ff09f1562e9f5c10.tar.xz
gsoc2013-evolution-cd0112576878cb5de3930835ff09f1562e9f5c10.tar.zst
gsoc2013-evolution-cd0112576878cb5de3930835ff09f1562e9f5c10.zip
Bug #494531 - Use quoted-printable encoding when necessary
For example when part body contains a line longer than some max.
Diffstat (limited to 'composer')
-rw-r--r--composer/e-msg-composer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 1b2d5c665c..02e5db7acd 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -283,7 +283,7 @@ best_encoding (GByteArray *buf, const gchar *charset)
if (status == (gsize) -1 || status > 0)
return -1;
- if (count == 0)
+ if ((count == 0) && (buf->len < LINE_LEN))
return CAMEL_TRANSFER_ENCODING_7BIT;
else if (count <= buf->len * 0.17)
return CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE;
@@ -703,6 +703,7 @@ build_message (EMsgComposer *composer,
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), html);
camel_object_unref (html);
+ camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE);
camel_multipart_add_part (body, part);
camel_object_unref (part);