mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-08 18:13:24 +02:00
Download small messages on metered connection only, refactoring, improvements
This commit is contained in:
@@ -92,6 +92,8 @@ public class MessageHelper {
|
||||
//props.put("mail.imaps.compress.strategy", "0");
|
||||
}
|
||||
|
||||
props.put("mail.imaps.fetchsize", Integer.toString(64 * 1024)); // default 16K
|
||||
|
||||
// https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html#properties
|
||||
props.put("mail.smtps.ssl.checkserveridentity", "true");
|
||||
props.put("mail.smtps.ssl.trust", "*");
|
||||
@@ -270,6 +272,11 @@ public class MessageHelper {
|
||||
return null;
|
||||
}
|
||||
|
||||
Integer getSize() throws MessagingException {
|
||||
int size = imessage.getSize();
|
||||
return (size < 0 ? null : size);
|
||||
}
|
||||
|
||||
static String getFormattedAddresses(Address[] addresses, boolean full) {
|
||||
if (addresses == null || addresses.length == 0)
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user