From 1c837930c898c6c3be974ba277696715c07fd799 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Mon, 8 Aug 2016 15:13:40 +0200 Subject: [PATCH] encode textual bodies as quoted printable by default --- .../com/fsck/k9/mail/internet/MimeMessageHelper.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/internet/MimeMessageHelper.java b/k9mail-library/src/main/java/com/fsck/k9/mail/internet/MimeMessageHelper.java index 56f834393..6ab3d1518 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/internet/MimeMessageHelper.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/internet/MimeMessageHelper.java @@ -26,11 +26,8 @@ public class MimeMessageHelper { String mimeType = multipart.getMimeType(); String contentType = String.format("%s; boundary=\"%s\"", mimeType, multipart.getBoundary()); part.setHeader(MimeHeader.HEADER_CONTENT_TYPE, contentType); - if (MimeUtility.isSameMimeType(mimeType, "multipart/signed")) { - setEncoding(part, MimeUtil.ENC_7BIT); - } else { - setEncoding(part, MimeUtil.ENC_8BIT); - } + // note: if this is ever changed to 8bit, multipart/signed parts must always be 7bit! + setEncoding(part, MimeUtil.ENC_7BIT); } else if (body instanceof TextBody) { String contentType; if (MimeUtility.mimeTypeMatches(part.getMimeType(), "text/*")) { @@ -44,7 +41,7 @@ public class MimeMessageHelper { } part.setHeader(MimeHeader.HEADER_CONTENT_TYPE, contentType); - setEncoding(part, MimeUtil.ENC_8BIT); + setEncoding(part, MimeUtil.ENC_QUOTED_PRINTABLE); } }