diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index ca2aceeb6d..26b72b8dad 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -1645,6 +1645,15 @@ public class MessageHelper { boolean isPlainText() { return "text/plain".equalsIgnoreCase(contentType.getBaseType()); } + + boolean isHtml() { + return "text/html".equalsIgnoreCase(contentType.getBaseType()); + } + + boolean isDSN() { + return ("message/delivery-status".equalsIgnoreCase(contentType.getBaseType()) || + "message/disposition-notification".equalsIgnoreCase(contentType.getBaseType())); + } } class MessageParts { @@ -1758,7 +1767,7 @@ public class MessageHelper { if ((TextUtils.isEmpty(charset) || charset.equalsIgnoreCase(StandardCharsets.US_ASCII.name()))) charset = null; - if (h.contentType.getBaseType().equalsIgnoreCase("text/plain")) { + if (h.isPlainText()) { Charset cs = null; try { if (charset != null) @@ -1788,7 +1797,7 @@ public class MessageHelper { if ("flowed".equalsIgnoreCase(h.contentType.getParameter("format"))) result = HtmlHelper.flow(result); result = "