Enable X-UIDONLY if available

pull/194/merge
M66B 3 years ago
parent ecb614d42f
commit a26376eda5

@ -1652,6 +1652,18 @@ public class IMAPStore extends Store
}
}
public synchronized void enable(String capability) throws ProtocolException, StoreClosedException {
IMAPProtocol p = null;
try {
p = getStoreProtocol("enable(" + capability + ")");
p.enable(capability);
} catch (ConnectionException cex) {
throw new StoreClosedException(this, cex.getMessage());
} finally {
releaseStoreProtocol(p);
}
}
/**
* Set the user name to be used with the PROXYAUTH command.
* The PROXYAUTH user name can also be set using the

@ -37,6 +37,7 @@ import androidx.annotation.NonNull;
import androidx.preference.PreferenceManager;
import com.sun.mail.gimap.GmailSSLProvider;
import com.sun.mail.iap.ProtocolException;
import com.sun.mail.imap.IMAPFolder;
import com.sun.mail.imap.IMAPStore;
import com.sun.mail.pop3.POP3Store;
@ -755,6 +756,14 @@ public class EmailService implements AutoCloseable {
throw ex;
}
// Verizon
if (istore.hasCapability("X-UIDONLY") && istore.hasCapability("ENABLE"))
try {
istore.enable("X-UIDONLY");
} catch (ProtocolException ex) {
Log.e(ex);
}
} else if ("smtp".equals(protocol) || "smtps".equals(protocol)) {
// https://tools.ietf.org/html/rfc5321#section-4.1.3
String hdomain = getDefaultEhlo();

Loading…
Cancel
Save