diff --git a/NEWS b/NEWS index b69cd419c..2dc79d15a 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ Bug fixes - [web] fixed handling of duplicate recipients (#4597) - [web] fixed folder export when XSRF validation is enabled (#4502) - [web] don't encode filename extension when exporting folders + - [web] fixed download of HTML body parts - [core] don't always fetch the sorting columns - [eas] strip '<>' from bodyId and when forwarding mails - [eas] fix search on for Outlook application (#4605 and #4607) diff --git a/SoObjects/Mailer/SOGoMailBodyPart.m b/SoObjects/Mailer/SOGoMailBodyPart.m index 266b18bb9..0706183e3 100644 --- a/SoObjects/Mailer/SOGoMailBodyPart.m +++ b/SoObjects/Mailer/SOGoMailBodyPart.m @@ -35,6 +35,7 @@ #import #import #import +#import #import #import @@ -265,10 +266,15 @@ static BOOL debugOn = NO; if (!obj) { /* lookup body part */ - if ([self isBodyPartKey: _key]) - obj = [self lookupImap4BodyPartKey: _key inContext: _ctx]; + if ([self isBodyPartKey: _key]) { + obj = [self lookupImap4BodyPartKey: _key inContext: _ctx]; + } else if ([_key isEqualToString: @"asAttachment"]) - [self setAsAttachment]; + { + // Don't try to render the part; rewrite object to a simple body part. + obj = [SOGoMailBodyPart objectWithName: [self nameInContainer] inContainer: [self container]]; + [obj setAsAttachment]; + } /* should check whether such a filename exist in the attached names */ if (!obj) obj = self;