diff --git a/app/src/main/java/eu/faircode/email/EmailProvider.java b/app/src/main/java/eu/faircode/email/EmailProvider.java index 6effd8adc0..19eb03973c 100644 --- a/app/src/main/java/eu/faircode/email/EmailProvider.java +++ b/app/src/main/java/eu/faircode/email/EmailProvider.java @@ -1488,6 +1488,10 @@ public class EmailProvider implements Parcelable { }); } + public boolean isSecure() { + return (score >= 100); + } + @Override public boolean equals(Object obj) { if (obj instanceof Server) { diff --git a/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java b/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java index 37f4f432b1..ffe52212bb 100644 --- a/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentQuickSetup.java @@ -588,7 +588,7 @@ public class FragmentQuickSetup extends FragmentBase { account.host = provider.imap.host; account.encryption = aencryption; - account.insecure = BuildConfig.PLAY_STORE_RELEASE; + account.insecure = (BuildConfig.PLAY_STORE_RELEASE && !provider.imap.isSecure()); account.port = provider.imap.port; account.auth_type = AUTH_TYPE_PASSWORD; account.user = user; @@ -638,6 +638,7 @@ public class FragmentQuickSetup extends FragmentBase { identity.host = provider.smtp.host; identity.encryption = iencryption; + identity.insecure = (BuildConfig.PLAY_STORE_RELEASE && !provider.smtp.isSecure()); identity.port = provider.smtp.port; identity.auth_type = AUTH_TYPE_PASSWORD; identity.user = user;