From 27d45b6d76bb094c916f8a0e3f50b7ce628fbbd6 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 5 Jul 2022 08:59:48 -0400 Subject: [PATCH] fix(mail): use encoding from MIME part --- SoObjects/Mailer/SOGoMailBodyPart.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SoObjects/Mailer/SOGoMailBodyPart.m b/SoObjects/Mailer/SOGoMailBodyPart.m index 3ebec6a2a..731786923 100644 --- a/SoObjects/Mailer/SOGoMailBodyPart.m +++ b/SoObjects/Mailer/SOGoMailBodyPart.m @@ -513,11 +513,12 @@ static BOOL debugOn = NO; // [self debugWithFormat:@" fetched %d bytes: %@", [data length], // [self partInfo]]; - // TODO: wrong, could be encoded response = [localContext response]; mimeType = [self davContentType]; if ([mimeType isEqualToString: @"application/x-xpinstall"]) mimeType = @"application/octet-stream"; + else if (!asAttachment) + mimeType = [self contentTypeForBodyPartInfo: [self partInfo]]; [response setHeader: mimeType forKey: @"content-type"]; [response setHeader: [NSString stringWithFormat:@"%d", (int)[data length]]