diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 1272fa7fee..1dc98762c4 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -4914,7 +4914,7 @@ class Core { if (mdn && helper.isReport()) try { - MessageHelper.Report r = parts.getReport(); + MessageHelper.Report r = parts.getReport(context); boolean client_id = prefs.getBoolean("client_id", true); String we = "dns;" + (client_id ? EmailService.getDefaultEhlo() : "example.com"); if (r != null && !we.equals(r.reporter)) { diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index a603f5a2c7..0925bef8ff 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -4244,7 +4244,7 @@ public class MessageHelper { HtmlHelper.formatPlainText(result) + ""; } else if (h.isReport()) { - Report report = new Report(h.contentType.getBaseType(), result); + Report report = new Report(h.contentType.getBaseType(), result, context); result = report.html; StringBuilder w = new StringBuilder(); @@ -4286,7 +4286,7 @@ public class MessageHelper { return sb.toString(); } - Report getReport() throws MessagingException, IOException { + Report getReport(Context context) throws MessagingException, IOException { for (PartHolder h : extra) if (h.isReport()) { String result; @@ -4297,7 +4297,7 @@ public class MessageHelper { result = Helper.readStream((InputStream) content); else result = content.toString(); - return new Report(h.contentType.getBaseType(), result); + return new Report(h.contentType.getBaseType(), result, context); } return null; } @@ -6062,7 +6062,7 @@ public class MessageHelper { String feedback; String html; - Report(String type, String content) { + Report(String type, String content, Context context) { this.type = type; StringBuilder report = new StringBuilder(); report.append("
"); @@ -6138,7 +6138,14 @@ public class MessageHelper { Log.e(ex); report.append(TextUtils.htmlEncode(new ThrowableWrapper(ex).toSafeString())); } + report.append("
"); + + if (isDeliveryStatus() && !isDelivered()) + report.append("
") + .append(TextUtils.htmlEncode(context.getString(R.string.title_report_remark))) + .append("
"); + this.html = report.toString(); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3e120d656d..c00db56f23 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1681,6 +1681,7 @@ Attachment saved Attachments saved Some attachments or images were not downloaded and could not be added + This report, a specially formatted email, was sent by an email server because a sent message could not be delivered to the recipient, for example because the mailbox is full, or because the email address does not exist (anymore). Save changes? Delete message permanently? I understand that permanently deleting messages is irreversible