From 4eb7fbc4c93e629ec63651f0843a5b252694b7e1 Mon Sep 17 00:00:00 2001 From: C Robert Date: Thu, 9 Jul 2009 15:49:45 +0000 Subject: [PATCH] Monotone-Parent: 25d90ddcd05eb7c341bcb5f66062d03818381a34 Monotone-Revision: 3a355e79e6eee869bec77ad32e28a6640e81cd02 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-07-09T15:49:45 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 2 ++ SoObjects/Mailer/SOGoDraftObject.m | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0a75e5fc2..a6879aaef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * UI/MailPartViewers/UIxMailRenderingContext.m: Display .tiff as attachments, some browsers don't support tiff. + * SoObjects/Mailer/SOGoDraftObject.m: Fixed content type for multipart + messages. 2009-07-07 Francis Lachapelle diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 9b94914fa..ca308136c 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -851,6 +851,9 @@ static BOOL showTextAttachmentsInline = NO; */ NGMutableHashMap *map; NGMimeBodyPart *bodyPart; + NSUserDefaults *ud; + + ud = [[context activeUser] userDefaults]; /* prepare header of body part */ @@ -859,7 +862,13 @@ static BOOL showTextAttachmentsInline = NO; // TODO: set charset in header! [map setObject: @"text/plain" forKey: @"content-type"]; if (text) - [map setObject: contentTypeValue forKey: @"content-type"]; + { + if ([[ud stringForKey: @"ComposeMessagesType"] isEqualToString: @"html"]) + [map setObject: htmlContentTypeValue + forKey: @"content-type"]; + else + [map setObject: contentTypeValue forKey: @"content-type"]; + } // if ((body = text) != nil) { // if ([body isKindOfClass: [NSString class]]) {