|
|
|
@ -928,15 +928,20 @@ public class MessageHelper {
|
|
|
|
|
// Build html body
|
|
|
|
|
Document document = JsoupEx.parse(message.getFile(context));
|
|
|
|
|
|
|
|
|
|
boolean resend = false;
|
|
|
|
|
if (message.headers != null && Boolean.TRUE.equals(message.resend)) {
|
|
|
|
|
Element body = document.body();
|
|
|
|
|
if (body.children().size() == 1) {
|
|
|
|
|
// Restore original body
|
|
|
|
|
Element ref = body.children().get(0);
|
|
|
|
|
if ("reference".equals(ref.attr("fairemail"))) {
|
|
|
|
|
body.replaceWith(ref.tagName("body").removeAttr("fairemail"));
|
|
|
|
|
resend = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!resend) {
|
|
|
|
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang
|
|
|
|
|
if (message.language != null)
|
|
|
|
|
document.body().attr("lang", message.language);
|
|
|
|
@ -1028,6 +1033,7 @@ public class MessageHelper {
|
|
|
|
|
db.endTransaction();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// multipart/mixed
|
|
|
|
|
// multipart/related
|
|
|
|
|