(fix) remaining S/MIME fixes to handle image/CIDs in HTML mails

This commit is contained in:
Ludovic Marcotte
2018-01-23 10:35:46 -05:00
parent 341e5cbab0
commit 511aa63a34
13 changed files with 221 additions and 92 deletions

View File

@@ -247,7 +247,7 @@
NSUInteger i, max;
if ([[self decodedFlatContent] isKindOfClass: [NGMimeMultipartBody class]])
if ([self decodedFlatContent])
parts = [[self decodedFlatContent] parts];
else
parts = [[self bodyInfo] objectForKey: @"parts"];
@@ -259,7 +259,7 @@
{
[self setChildIndex: i];
if ([[self decodedFlatContent] isKindOfClass: [NGMimeMultipartBody class]])
if ([self decodedFlatContent])
[self setChildInfo: [[parts objectAtIndex: i] bodyInfo]];
else
[self setChildInfo: [parts objectAtIndex: i]];
@@ -268,10 +268,11 @@
viewer = [[[self context] mailRenderingContext] viewerForBodyInfo: info];
[viewer setBodyInfo: info];
[viewer setPartPath: [self childPartPath]];
[viewer setAttachmentIds: attachmentIds];
if ([[self decodedFlatContent] isKindOfClass: [NGMimeMultipartBody class]])
if ([self decodedFlatContent])
[viewer setDecodedContent: [[parts objectAtIndex: i] body]];
[viewer setAttachmentIds: attachmentIds];
[renderedParts addObject: [viewer renderedPart]];
}