mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 00:51:44 +01:00
POP3 support
This commit is contained in:
@@ -103,7 +103,7 @@ public class EntityAccount extends EntityOrder implements Serializable {
|
||||
public Long last_connected;
|
||||
|
||||
String getProtocol() {
|
||||
return "imap" + (starttls ? "" : "s");
|
||||
return (pop ? "pop3" : "imap") + (starttls ? "" : "s");
|
||||
}
|
||||
|
||||
static String getNotificationChannelId(long id) {
|
||||
@@ -146,6 +146,7 @@ public class EntityAccount extends EntityOrder implements Serializable {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("id", id);
|
||||
json.put("order", order);
|
||||
json.put("pop", pop);
|
||||
json.put("host", host);
|
||||
json.put("starttls", starttls);
|
||||
json.put("insecure", insecure);
|
||||
@@ -184,6 +185,9 @@ public class EntityAccount extends EntityOrder implements Serializable {
|
||||
if (json.has("order"))
|
||||
account.order = json.getInt("order");
|
||||
|
||||
if (json.has("pop"))
|
||||
account.pop = json.getBoolean("pop");
|
||||
|
||||
account.host = json.getString("host");
|
||||
account.starttls = (json.has("starttls") && json.getBoolean("starttls"));
|
||||
account.insecure = (json.has("insecure") && json.getBoolean("insecure"));
|
||||
|
||||
Reference in New Issue
Block a user