From c5234d88e0dbefbc7b69ac246a14cecbad01a495 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Tue, 10 Jan 2017 15:11:41 +0100 Subject: [PATCH] set content-transfer-encoding for RawDataBody in `setBody` --- .../main/java/com/fsck/k9/mail/internet/MimeMessageHelper.java | 3 +++ 1 file changed, 3 insertions(+) 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 6ab3d1518..4171dba64 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 @@ -42,6 +42,9 @@ public class MimeMessageHelper { part.setHeader(MimeHeader.HEADER_CONTENT_TYPE, contentType); setEncoding(part, MimeUtil.ENC_QUOTED_PRINTABLE); + } else if (body instanceof RawDataBody) { + String encoding = ((RawDataBody) body).getEncoding(); + part.setHeader(MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING, encoding); } }