From 84453d0236856531a0ff0bdb2426725bb89398dd Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 29 Aug 2018 07:26:10 +0000 Subject: [PATCH] Attachment unsupported encoding --- app/src/main/java/eu/faircode/email/MessageHelper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 5b1a037e..a34b4347 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -365,7 +365,13 @@ public class MessageHelper { IOException, MessagingException { List result = new ArrayList<>(); - Object content = part.getContent(); + Object content; + try { + content = part.getContent(); + } catch (UnsupportedEncodingException ex) { + Log.w(Helper.TAG, "attachment content type=" + part.getContentType()); + content = part.getInputStream(); + } if (content instanceof InputStream || content instanceof String) { String disposition; try {