diff --git a/SoObjects/Mailer/SOGoMailObject.m b/SoObjects/Mailer/SOGoMailObject.m index 41947964a..5f543af38 100644 --- a/SoObjects/Mailer/SOGoMailObject.m +++ b/SoObjects/Mailer/SOGoMailObject.m @@ -840,6 +840,7 @@ static BOOL debugSoParts = NO; path, @"path", [part objectForKey: @"encoding"], @"encoding", [part objectForKey:@ "size"], @"size", + [part objectForKey: @"bodyId"], @"bodyId", [NSString stringWithFormat: @"%@/%@", prefix, filenameURL], @"url", [NSString stringWithFormat: @"%@/asAttachment/%@", prefix, filenameURL], @"urlAsAttachment", nil]; diff --git a/UI/MailPartViewers/UIxMailPartHTMLViewer.m b/UI/MailPartViewers/UIxMailPartHTMLViewer.m index 54631f706..42366b037 100644 --- a/UI/MailPartViewers/UIxMailPartHTMLViewer.m +++ b/UI/MailPartViewers/UIxMailPartHTMLViewer.m @@ -609,7 +609,8 @@ static NSData* _sanitizeContent(NSData *theData) value = [_attributes valueAtIndex: count]; if ([value hasPrefix: @"cid:"]) { - cid = [value substringFromIndex: 4]; + cid = [NSString stringWithFormat: @"<%@>", + [value substringFromIndex: 4]]; value = [attachmentIds objectForKey: cid]; skipAttribute = (value == nil); } diff --git a/UI/MailerUI/UIxMailView.m b/UI/MailerUI/UIxMailView.m index 450af002c..091ec8214 100644 --- a/UI/MailerUI/UIxMailView.m +++ b/UI/MailerUI/UIxMailView.m @@ -215,6 +215,7 @@ static NSString *mailETag = nil; NSMutableDictionary *attachmentIds; NSDictionary *attributes; + NSString *filename; unsigned int count, max; max = [[self attachmentAttrs] count]; @@ -222,8 +223,12 @@ static NSString *mailETag = nil; for (count = 0; count < max; count++) { attributes = [[self attachmentAttrs] objectAtIndex: count]; + filename = [NSString stringWithFormat: @"<%@>", [attributes objectForKey: @"filename"]]; [attachmentIds setObject: [attributes objectForKey: @"url"] - forKey: [attributes objectForKey: @"filename"]]; + forKey: filename]; + if ([[attributes objectForKey: @"bodyId"] length]) + [attachmentIds setObject: [attributes objectForKey: @"url"] + forKey: [attributes objectForKey: @"bodyId"]]; } [viewer setAttachmentIds: attachmentIds];