Changeset 64
- Timestamp:
- 12/02/07 18:23:02
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/src/tmut-msg-creator.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r57 r64 1 2007-12-02 Philip Van Hoof <pvanhoof@gnome.org> 2 3 * Creating multipart messages correctly 4 1 5 2007-11-15 Philip Van Hoof <pvanhoof@gnome.org> 2 6 trunk/src/tmut-msg-creator.c
r48 r64 35 35 #include <tny-camel-mem-stream.h> 36 36 #include <tny-camel-send-queue.h> 37 #include <tny-camel-mime-part.h> 37 38 38 39 #include <string.h> … … 169 170 TnyStream *stream = tny_camel_mem_stream_new (); 170 171 TnyHeader *header = tny_msg_get_header (msg); 171 TnyIterator *iter = tny_list_create_iterator (priv->attachments);172 172 173 173 tny_header_set_subject (header, gtk_entry_get_text (priv->subject_entry)); … … 181 181 tny_stream_write (stream, text, strlen (text)); 182 182 tny_stream_reset (stream); 183 tny_mime_part_construct_from_stream (TNY_MIME_PART (msg), stream, "text/plain"); 183 184 tny_mime_part_set_header_pair (TNY_MIME_PART (msg), "X-Mailer", "TMut - " VERSION); 185 186 if (tny_list_get_length (priv->attachments) > 0) { 187 TnyIterator *iter = tny_list_create_iterator (priv->attachments); 188 TnyMimePart *msg_part = tny_camel_mime_part_new (); 189 190 tny_mime_part_construct_from_stream (msg_part, stream, "text/plain"); 191 tny_mime_part_add_part (TNY_MIME_PART (msg), msg_part); 192 g_object_unref (msg_part); 193 194 while (!tny_iterator_is_done (iter)) { 195 TnyMimePart *part = TNY_MIME_PART (tny_iterator_get_current (iter)); 196 tny_mime_part_add_part (TNY_MIME_PART (msg), part); 197 g_object_unref (part); 198 tny_iterator_next (iter); 199 } 200 g_object_unref (iter); 201 } else 202 tny_mime_part_construct_from_stream (TNY_MIME_PART (msg), stream, "text/plain"); 203 184 204 g_object_unref (stream); 185 186 tny_mime_part_set_header_pair (TNY_MIME_PART (msg), "X-Mailer", "TMut - " VERSION);187 188 while (!tny_iterator_is_done (iter)) {189 TnyMimePart *part = TNY_MIME_PART (tny_iterator_get_current (iter));190 tny_mime_part_add_part (TNY_MIME_PART (msg), part);191 g_object_unref (part);192 tny_iterator_next (iter);193 }194 g_object_unref (iter);195 196 205 tny_send_queue_add (send_queue, msg, NULL); 197 206 … … 199 208 g_object_unref (send_queue); 200 209 g_object_unref (account); 210 201 211 } else 202 212 not_ready = TRUE;
