1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 09:17:58 +00:00

Prefer Date header over INTERNALDATE

Servers have so many bugs, does nobody pay attention?
This commit is contained in:
M66B 2019-11-15 22:09:09 +01:00
parent 679eb92f74
commit d1c2a688df

View file

@ -772,6 +772,16 @@ public class MessageHelper {
}
long getReceived() throws MessagingException {
String date = imessage.getHeader("Date", null);
if (date != null) {
try {
Date received = new MailDateFormat().parse(date);
Log.i("Parsed received=" + received);
return received.getTime();
} catch (java.text.ParseException ignored) {
}
}
Date received = imessage.getReceivedDate();
if (received == null)
received = imessage.getSentDate();