From 9e364c647ff7ed6e3e0bab1b1b19fd3bbfd9b65e Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 25 Aug 2021 14:36:55 -0400 Subject: [PATCH] fix(mail): encode text MIME parts in quoted-printable This reverts commit 6cf3d9912595dccaf5e148b7ea622e933f5c0a76. Fixes #5378 --- SoObjects/Mailer/SOGoDraftObject.m | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index e0c53849d..6c49c8fbc 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -28,7 +28,6 @@ #import #import #import -#import #import #import #import @@ -1271,12 +1270,11 @@ static NSString *userAgent = nil; map = [[[NGMutableHashMap alloc] initWithCapacity: 1] autorelease]; [map setObject: contentTypeValue forKey: @"content-type"]; - [map setObject: @"quoted-printable" forKey: @"content-transfer-encoding"]; /* prepare body content */ bodyPart = [[[NGMimeBodyPart alloc] initWithHeader:map] autorelease]; - plainText = [[text htmlToText] stringByEncodingQuotedPrintable]; + plainText = [text htmlToText]; [bodyPart setBody: plainText]; return bodyPart; @@ -1299,15 +1297,12 @@ static NSString *userAgent = nil; // TODO: set charset in header! if (text) - { - [map setObject: (isHTML ? htmlContentTypeValue : contentTypeValue) - forKey: @"content-type"]; - [map setObject: @"quoted-printable" forKey: @"content-transfer-encoding"]; - } + [map setObject: (isHTML ? htmlContentTypeValue : contentTypeValue) + forKey: @"content-type"]; /* prepare body content */ bodyPart = [[[NGMimeBodyPart alloc] initWithHeader:map] autorelease]; - [bodyPart setBody: [text stringByEncodingQuotedPrintable]]; + [bodyPart setBody: text]; return bodyPart; }