- switch (forward_type) {
- TnyMimePart *attachment_part;
- gchar *inlined_text;
-
- case MODEST_MAIL_OPERATION_FORWARD_TYPE_INLINE:
- /* Prepend "Original message" text */
- inlined_text = (gchar *)
- modest_text_utils_inlined_text (tny_header_get_from (header),
- tny_header_get_date_sent (header),
- tny_header_get_to (header),
- tny_header_get_subject (header),
- (const gchar*) new_body);
- g_free (new_body);
- new_body = inlined_text;
-
- /* Add body part */
- add_body_part (new_msg, new_body,
- (const gchar *) content_type,
- (tny_list_get_length (parts) > 0) ? TRUE : FALSE);
-
- break;
- case MODEST_MAIL_OPERATION_FORWARD_TYPE_ATTACHMENT:
- attachment_part = add_body_part (new_msg, new_body,
- (const gchar *) content_type, TRUE);
-
- /* Set the subject as the name of the attachment */
- tny_mime_part_set_filename (attachment_part, tny_header_get_subject (header));
-
- break;
- default:
- g_warning (_("Invalid forward type"));
- g_free (new_msg);
- }
-