diff --git a/SoObjects/Mailer/SOGoMailBodyPart.m b/SoObjects/Mailer/SOGoMailBodyPart.m index 5cb01b106..1cc1d485d 100644 --- a/SoObjects/Mailer/SOGoMailBodyPart.m +++ b/SoObjects/Mailer/SOGoMailBodyPart.m @@ -292,7 +292,16 @@ static BOOL debugOn = NO; - (NSData *) fetchBLOB { - if ([[self container] isEncrypted]) + id o; + + // We check if the associated SOGoMailObject is encrypted, we must navigate + // in the container list until we find the proper container. + o = [self container]; + + while (![o isKindOfClass: [SOGoMailObject class]]) + o = [o container]; + + if ([o isEncrypted]) { NSData *certificate;