1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-25 15:32:52 +00:00

Process some non-standard read request headers

This commit is contained in:
M66B 2021-12-15 20:10:56 +01:00
parent 716884ef5d
commit 8b69c15980

View file

@ -1445,15 +1445,19 @@ public class MessageHelper {
}
boolean getReceiptRequested() throws MessagingException {
ensureHeaders();
// Return-Receipt-To = delivery receipt
// Disposition-Notification-To = read receipt
return (imessage.getHeader("Disposition-Notification-To") != null);
Address[] headers = getReceiptTo();
return (headers != null && headers.length > 0);
}
Address[] getReceiptTo() throws MessagingException {
return getAddressHeader("Disposition-Notification-To");
// Return-Receipt-To = delivery receipt
// Disposition-Notification-To = read receipt
Address[] receipt = getAddressHeader("Disposition-Notification-To");
if (receipt == null || receipt.length == 0)
receipt = getAddressHeader("Read-Receipt-To");
if (receipt == null || receipt.length == 0)
receipt = getAddressHeader("X-Confirm-reading-to");
return receipt;
}
String getBimiSelector() throws MessagingException {