]> err.no Git - scalable-opengroupware.org/commitdiff
set content-disposition of text/* to attachment (prev inline)
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 18 Jul 2005 11:52:59 +0000 (11:52 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 18 Jul 2005 11:52:59 +0000 (11:52 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@785 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/SoObjects/Mailer/ChangeLog
SOGo/SoObjects/Mailer/SOGoDraftObject.m
SOGo/SoObjects/Mailer/Version

index 2e7ab97ff4290b73773288e211d5823619946e1c..bec74cc5282afba664ca266fd3d67a4a78ea5e5b 100644 (file)
@@ -1,3 +1,10 @@
+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
index 5256090b1d26cec273b3b00f4f0166c8d03e1392..02fe48d1f444f3b05b65bad73e6de66a228abcd3 100644 (file)
@@ -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
index db945487d01d238b4f62098cc8cff6b5c6de132d..0c2f875cb13a1c7459625d439f2755ff5f8628d7 100644 (file)
@@ -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