mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Added POP3 option to leave messages on server
This commit is contained in:
@@ -85,8 +85,6 @@ public class MailService implements AutoCloseable {
|
||||
properties.put("mail." + protocol + ".writetimeout", Integer.toString(WRITE_TIMEOUT)); // one thread overhead
|
||||
properties.put("mail." + protocol + ".timeout", Integer.toString(READ_TIMEOUT));
|
||||
|
||||
//properties.put("mail." + protocol + ".rsetbeforequit", "true");
|
||||
|
||||
} else if ("imap".equals(protocol) || "imaps".equals(protocol)) {
|
||||
// https://javaee.github.io/javamail/docs/api/com/sun/mail/imap/package-summary.html#properties
|
||||
properties.put("mail." + protocol + ".ssl.checkserveridentity", checkserveridentity);
|
||||
@@ -158,6 +156,10 @@ public class MailService implements AutoCloseable {
|
||||
properties.put("mail." + protocol + ".separatestoreconnection", "true");
|
||||
}
|
||||
|
||||
void setLeaveOnServer(boolean keep) {
|
||||
properties.put("mail." + protocol + ".rsetbeforequit", Boolean.toString(keep));
|
||||
}
|
||||
|
||||
public void connect(EntityAccount account) throws MessagingException {
|
||||
String password = connect(account.host, account.port, account.auth_type, account.user, account.password);
|
||||
if (password != null) {
|
||||
|
||||
Reference in New Issue
Block a user