mirror of https://github.com/M66B/FairEmail.git
Fixed DSN thread ID
This commit is contained in:
parent
e84838915b
commit
8b5f1b6169
|
@ -658,26 +658,33 @@ public class MessageHelper {
|
||||||
String reportType = ct.getParameter("report-type");
|
String reportType = ct.getParameter("report-type");
|
||||||
if ("delivery-status".equalsIgnoreCase(reportType) ||
|
if ("delivery-status".equalsIgnoreCase(reportType) ||
|
||||||
"disposition-notification".equalsIgnoreCase(reportType)) {
|
"disposition-notification".equalsIgnoreCase(reportType)) {
|
||||||
String amsgid = null;
|
|
||||||
String arefs = null;
|
String arefs = null;
|
||||||
|
String amsgid = null;
|
||||||
|
|
||||||
MessageParts parts = new MessageParts();
|
MessageParts parts = new MessageParts();
|
||||||
getMessageParts(imessage, parts, null);
|
getMessageParts(imessage, parts, null);
|
||||||
for (AttachmentPart apart : parts.attachments)
|
for (AttachmentPart apart : parts.attachments)
|
||||||
if ("text/rfc822-headers".equalsIgnoreCase(apart.attachment.type)) {
|
if ("text/rfc822-headers".equalsIgnoreCase(apart.attachment.type)) {
|
||||||
InternetHeaders iheaders = new InternetHeaders(apart.part.getInputStream());
|
InternetHeaders iheaders = new InternetHeaders(apart.part.getInputStream());
|
||||||
amsgid = iheaders.getHeader("Message-Id", null);
|
|
||||||
arefs = iheaders.getHeader("References", null);
|
arefs = iheaders.getHeader("References", null);
|
||||||
|
amsgid = iheaders.getHeader("Message-Id", null);
|
||||||
break;
|
break;
|
||||||
} else if ("message/rfc822".equalsIgnoreCase(apart.attachment.type)) {
|
} else if ("message/rfc822".equalsIgnoreCase(apart.attachment.type)) {
|
||||||
Properties props = MessageHelper.getSessionProperties();
|
Properties props = MessageHelper.getSessionProperties();
|
||||||
Session isession = Session.getInstance(props, null);
|
Session isession = Session.getInstance(props, null);
|
||||||
MimeMessage amessage = new MimeMessage(isession, apart.part.getInputStream());
|
MimeMessage amessage = new MimeMessage(isession, apart.part.getInputStream());
|
||||||
amsgid = amessage.getHeader("Message-Id", null);
|
|
||||||
arefs = amessage.getHeader("References", null);
|
arefs = amessage.getHeader("References", null);
|
||||||
|
amsgid = amessage.getHeader("Message-Id", null);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (arefs != null)
|
||||||
|
for (String ref : MimeUtility.unfold(arefs).split("\\s+"))
|
||||||
|
if (!result.contains(ref)) {
|
||||||
|
Log.i("rfc822 ref=" + ref);
|
||||||
|
result.add(ref);
|
||||||
|
}
|
||||||
|
|
||||||
if (amsgid != null) {
|
if (amsgid != null) {
|
||||||
String msgid = MimeUtility.unfold(amsgid);
|
String msgid = MimeUtility.unfold(amsgid);
|
||||||
if (!result.contains(msgid)) {
|
if (!result.contains(msgid)) {
|
||||||
|
@ -685,13 +692,6 @@ public class MessageHelper {
|
||||||
result.add(msgid);
|
result.add(msgid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arefs != null)
|
|
||||||
for (String ref : MimeUtility.unfold(arefs).split("\\s+"))
|
|
||||||
if (!result.contains(ref)) {
|
|
||||||
Log.i("rfc822 ref=" + ref);
|
|
||||||
result.add(ref);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
|
|
Loading…
Reference in New Issue