set content-transfer-encoding for RawDataBody in setBody

This commit is contained in:
Vincent Breitmoser 2017-01-10 15:11:41 +01:00
parent 6beb9902da
commit c5234d88e0

View file

@ -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);
}
}