mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 15:17:03 +02:00
Added reply to list
This commit is contained in:
@@ -533,26 +533,6 @@ public class MessageHelper {
|
||||
return result;
|
||||
}
|
||||
|
||||
Address getSender() throws MessagingException {
|
||||
String sender = imessage.getHeader("Sender", null);
|
||||
if (sender == null)
|
||||
return null;
|
||||
|
||||
InternetAddress[] address = null;
|
||||
try {
|
||||
address = InternetAddress.parse(sender);
|
||||
} catch (AddressException ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
|
||||
if (address == null || address.length == 0)
|
||||
return null;
|
||||
|
||||
fix(address[0]);
|
||||
|
||||
return address[0];
|
||||
}
|
||||
|
||||
Address[] getFrom() throws MessagingException {
|
||||
return fix(imessage.getFrom());
|
||||
}
|
||||
@@ -577,6 +557,27 @@ public class MessageHelper {
|
||||
return null;
|
||||
}
|
||||
|
||||
Address[] getListPost() throws MessagingException {
|
||||
// https://www.ietf.org/rfc/rfc2369.txt
|
||||
String list = imessage.getHeader("List-Post", null);
|
||||
if (list == null || "NO".equals(list))
|
||||
return null;
|
||||
|
||||
InternetAddress[] address = null;
|
||||
try {
|
||||
address = InternetAddress.parse(list);
|
||||
} catch (AddressException ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
|
||||
if (address == null || address.length == 0)
|
||||
return null;
|
||||
|
||||
fix(address[0]);
|
||||
|
||||
return new Address[]{address[0]};
|
||||
}
|
||||
|
||||
private static Address[] fix(Address[] addresses) {
|
||||
if (addresses != null)
|
||||
for (int i = 0; i < addresses.length; i++)
|
||||
|
||||
Reference in New Issue
Block a user