aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-attachment.c
diff options
context:
space:
mode:
Diffstat (limited to 'composer/e-msg-composer-attachment.c')
-rw-r--r--composer/e-msg-composer-attachment.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c
index 796004c283..0255cd4e4c 100644
--- a/composer/e-msg-composer-attachment.c
+++ b/composer/e-msg-composer-attachment.c
@@ -153,6 +153,7 @@ e_msg_composer_attachment_new (const gchar *file_name)
CamelStream *stream;
struct stat statbuf;
gchar *mime_type;
+ char *content_id;
g_return_val_if_fail (file_name != NULL, NULL);
@@ -186,6 +187,11 @@ e_msg_composer_attachment_new (const gchar *file_name)
else
camel_mime_part_set_filename (part, file_name);
+ /* set the Content-Id */
+ content_id = header_msgid_generate ();
+ camel_mime_part_set_content_id (part, content_id);
+ g_free (content_id);
+
new = e_msg_composer_attachment_new_from_mime_part (part);
new->size = statbuf.st_size;