mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 07:06:18 +02:00
Added encryption none
This commit is contained in:
@@ -297,9 +297,10 @@ public class FragmentQuickSetup extends FragmentBase {
|
||||
|
||||
List<EntityFolder> folders;
|
||||
|
||||
String aprotocol = provider.imap.starttls ? "imap" : "imaps";
|
||||
String aprotocol = (provider.imap.starttls ? "imap" : "imaps");
|
||||
int aencryption = (provider.imap.starttls ? EmailService.ENCRYPTION_STARTTLS : EmailService.ENCRYPTION_SSL);
|
||||
try (EmailService iservice = new EmailService(
|
||||
context, aprotocol, null, false, EmailService.PURPOSE_CHECK, true)) {
|
||||
context, aprotocol, null, aencryption, false, EmailService.PURPOSE_CHECK, true)) {
|
||||
try {
|
||||
iservice.connect(
|
||||
provider.imap.host, provider.imap.port,
|
||||
@@ -340,9 +341,11 @@ public class FragmentQuickSetup extends FragmentBase {
|
||||
}
|
||||
|
||||
Long max_size = null;
|
||||
String iprotocol = provider.smtp.starttls ? "smtp" : "smtps";
|
||||
String iprotocol = (provider.smtp.starttls ? "smtp" : "smtps");
|
||||
int iencryption = (provider.smtp.starttls ? EmailService.ENCRYPTION_STARTTLS : EmailService.ENCRYPTION_SSL);
|
||||
try (EmailService iservice = new EmailService(
|
||||
context, iprotocol, null, false, EmailService.PURPOSE_CHECK, true)) {
|
||||
context, iprotocol, null, iencryption, false,
|
||||
EmailService.PURPOSE_CHECK, true)) {
|
||||
iservice.setUseIp(provider.useip, null);
|
||||
iservice.connect(
|
||||
provider.smtp.host, provider.smtp.port,
|
||||
@@ -373,7 +376,7 @@ public class FragmentQuickSetup extends FragmentBase {
|
||||
EntityAccount account = new EntityAccount();
|
||||
|
||||
account.host = provider.imap.host;
|
||||
account.starttls = provider.imap.starttls;
|
||||
account.encryption = aencryption;
|
||||
account.port = provider.imap.port;
|
||||
account.auth_type = EmailService.AUTH_TYPE_PASSWORD;
|
||||
account.user = user;
|
||||
@@ -423,7 +426,7 @@ public class FragmentQuickSetup extends FragmentBase {
|
||||
identity.account = account.id;
|
||||
|
||||
identity.host = provider.smtp.host;
|
||||
identity.starttls = provider.smtp.starttls;
|
||||
identity.encryption = iencryption;
|
||||
identity.port = provider.smtp.port;
|
||||
identity.auth_type = EmailService.AUTH_TYPE_PASSWORD;
|
||||
identity.user = user;
|
||||
|
||||
Reference in New Issue
Block a user