aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog5
-rw-r--r--composer/e-msg-composer-attachment-bar.c13
2 files changed, 16 insertions, 2 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 8dfea666fb..a6fde518af 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-10 Dan Winship <danw@helixcode.com>
+
+ * e-msg-composer-attachment-bar.c (attach_to_multipart): deal with
+ Content-Transfer-Encoding a little bit at least.
+
2000-05-07 Mathieu Lacage <mathieu@gnu.org>
* e-msg-composer.c (create_editor): remove FIXME and hardcoded
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index 57eb2d42b6..5041164d9b 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -608,12 +608,11 @@ attach_to_multipart (CamelMultipart *multipart,
CamelMimePart *part;
struct stat st;
int fd;
+ char *data;
part = camel_mime_part_new ();
fd = open (attachment->file_name, O_RDONLY);
if (fd != -1 && fstat (fd, &st) != -1) {
- char *data;
-
data = g_malloc (st.st_size);
read (fd, data, st.st_size);
close (fd);
@@ -631,6 +630,16 @@ attach_to_multipart (CamelMultipart *multipart,
g_basename (attachment->file_name));
camel_mime_part_set_description (part, attachment->description);
+ /* Kludge a bit on CTE. For now, we set QP for text/ and message/
+ * and B64 for all else. FIXME.
+ */
+
+ if (!strncasecmp (attachment->mime_type, "text/", 5) ||
+ !strncasecmp (attachment->mime_type, "message/", 8))
+ camel_mime_part_set_encoding (part, CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE);
+ else
+ camel_mime_part_set_encoding (part, CAMEL_MIME_PART_ENCODING_BASE64);
+
camel_multipart_add_part (multipart, part);
gtk_object_unref (GTK_OBJECT (part));
}