mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-21 06:52:40 +00:00
HTML Composing, see changelog
Monotone-Parent: b895c283a3da52c67fd91339f704dc8cd49b743f Monotone-Revision: 5f0e6bd5b6298ffdd908398135216841ba3b6909 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-06-23T17:53:18 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
445224aa8f
commit
f9337f183f
13 files changed
+236
-113
No files matched your search
@@ -70,6 +70,7 @@
|
||||
#import "SOGoDraftObject.h"
|
||||
|
||||
static NSString *contentTypeValue = @"text/plain; charset=utf-8";
|
||||
static NSString *htmlContentTypeValue = @"text/html; charset=utf-8";
|
||||
static NSString *headerKeys[] = {@"subject", @"to", @"cc", @"bcc",
|
||||
@"from", @"replyTo", @"message-id",
|
||||
nil};
|
||||
@@ -879,17 +880,24 @@ static BOOL showTextAttachmentsInline = NO;
|
||||
- (NGMimeMessage *) mimeMessageForContentWithHeaderMap: (NGMutableHashMap *) map
|
||||
{
|
||||
NGMimeMessage *message;
|
||||
NSUserDefaults *ud;
|
||||
// BOOL addSuffix;
|
||||
id body;
|
||||
|
||||
ud = [[context activeUser] userDefaults];
|
||||
|
||||
[map setObject: @"text/plain" forKey: @"content-type"];
|
||||
body = text;
|
||||
if (body)
|
||||
{
|
||||
// if ([body isKindOfClass:[NSString class]])
|
||||
/* Note: just 'utf8' is displayed wrong in Mail.app */
|
||||
[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"];
|
||||
// body = [body dataUsingEncoding:NSUTF8StringEncoding];
|
||||
// else if ([body isKindOfClass:[NSData class]] && addSuffix) {
|
||||
// body = [[body mutableCopy] autorelease];
|
||||
|
||||
Reference in new issue
Block a user