mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Preserving LOGINDISABLED
This commit is contained in:
@@ -750,7 +750,12 @@ public class IMAPStore extends Store
|
||||
if (p.hasCapability("STARTTLS")) {
|
||||
p.startTLS();
|
||||
// if startTLS succeeds, refresh capabilities
|
||||
boolean logindisabled = p.hasCapability("LOGINDISABLED");
|
||||
p.capability();
|
||||
if (logindisabled && !p.hasCapability("LOGINDISABLED")) {
|
||||
eu.faircode.email.Log.e("Preserving LOGINDISABLED");
|
||||
p.setCapability("LOGINDISABLED");
|
||||
}
|
||||
} else if (requireStartTLS) {
|
||||
logger.fine("STARTTLS required but not supported by server");
|
||||
throw new ProtocolException(
|
||||
|
||||
@@ -412,6 +412,10 @@ public class IMAPProtocol extends Protocol {
|
||||
return capabilities.containsKey(c.toUpperCase(Locale.ENGLISH));
|
||||
}
|
||||
|
||||
public void setCapability(String c) {
|
||||
capabilities.put(c.toUpperCase(Locale.ENGLISH), c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the map of capabilities returned by the server.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user