+2005-07-18 Helge Hess <helge.hess@opengroupware.org>
+
+ * SOGoDraftObject.m: send text/* attachments with disposition 'attach'
+ instead of 'inline' (inline can still be enabled with the
+ 'SOGoShowTextAttachmentsInline' default, but be aware of the charset
+ issues with text attachments!) (v0.9.108)
+
2005-07-15 Helge Hess <helge.hess@opengroupware.org>
* v0.9.107
static NSString *userAgent = @"SOGoMail 1.0";
static BOOL draftDeleteDisabled = NO; // for debugging
static BOOL debugOn = NO;
+static BOOL showTextAttachmentsInline = NO;
+ (void)initialize {
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
-
+
+ /* Note: be aware of the charset issues before enabling this! */
+ showTextAttachmentsInline = [ud boolForKey:@"SOGoShowTextAttachmentsInline"];
+
if ((draftDeleteDisabled = [ud boolForKey:@"SOGoNoDraftDeleteAfterSend"]))
NSLog(@"WARNING: draft delete is disabled! (SOGoNoDraftDeleteAfterSend)");
/* NGMime representations */
- (NGMimeBodyPart *)bodyPartForText {
+ /*
+ This add the text typed by the user (the primary plain/text part).
+ */
NGMutableHashMap *map;
NGMimeBodyPart *bodyPart;
NSDictionary *lInfo;
type = [self contentTypeForAttachmentWithName:_name];
if ([type hasPrefix:@"text/"])
- cdtype = @"inline";
+ cdtype = showTextAttachmentsInline ? @"inline" : @"attachment";
else if ([type hasPrefix:@"image/"] || [type hasPrefix:@"message"])
cdtype = @"inline";
else