mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Refactoring
This commit is contained in:
@@ -23,6 +23,8 @@ import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
import com.sun.mail.imap.IMAPMessage;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -530,6 +532,18 @@ public class MessageHelper {
|
||||
return (size < 0 ? null : size);
|
||||
}
|
||||
|
||||
long getReceived() throws MessagingException {
|
||||
if (imessage instanceof IMAPMessage)
|
||||
return imessage.getReceivedDate().getTime();
|
||||
else
|
||||
return new Date().getTime();
|
||||
}
|
||||
|
||||
Long getSent() throws MessagingException {
|
||||
Date date = imessage.getSentDate();
|
||||
return (date == null ? null : date.getTime());
|
||||
}
|
||||
|
||||
String getHeaders() throws MessagingException {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Enumeration<Header> headers = imessage.getAllHeaders();
|
||||
|
||||
Reference in New Issue
Block a user