From 6ced1e56141ef93f4a9726d26d0e0b20baf86cbb Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 18 Jul 2005 11:52:59 +0000 Subject: [PATCH] set content-disposition of text/* to attachment (prev inline) git-svn-id: http://svn.opengroupware.org/SOGo/trunk@785 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/Mailer/ChangeLog | 7 +++++++ SOGo/SoObjects/Mailer/SOGoDraftObject.m | 11 +++++++++-- SOGo/SoObjects/Mailer/Version | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/SOGo/SoObjects/Mailer/ChangeLog b/SOGo/SoObjects/Mailer/ChangeLog index 2e7ab97f..bec74cc5 100644 --- a/SOGo/SoObjects/Mailer/ChangeLog +++ b/SOGo/SoObjects/Mailer/ChangeLog @@ -1,3 +1,10 @@ +2005-07-18 Helge Hess + + * 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 * v0.9.107 diff --git a/SOGo/SoObjects/Mailer/SOGoDraftObject.m b/SOGo/SoObjects/Mailer/SOGoDraftObject.m index 5256090b..02fe48d1 100644 --- a/SOGo/SoObjects/Mailer/SOGoDraftObject.m +++ b/SOGo/SoObjects/Mailer/SOGoDraftObject.m @@ -39,10 +39,14 @@ static NGMimeType *MultiMixedType = nil; 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)"); @@ -253,6 +257,9 @@ static BOOL debugOn = NO; /* NGMime representations */ - (NGMimeBodyPart *)bodyPartForText { + /* + This add the text typed by the user (the primary plain/text part). + */ NGMutableHashMap *map; NGMimeBodyPart *bodyPart; NSDictionary *lInfo; @@ -335,7 +342,7 @@ static BOOL debugOn = NO; 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 diff --git a/SOGo/SoObjects/Mailer/Version b/SOGo/SoObjects/Mailer/Version index db945487..0c2f875c 100644 --- a/SOGo/SoObjects/Mailer/Version +++ b/SOGo/SoObjects/Mailer/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=107 +SUBMINOR_VERSION:=108 # v0.9.96 requires libNGMime v4.5.223 # v0.9.91 requires libNGMime v4.5.222 -- 2.39.5