Added encryption none

This commit is contained in:
M66B
2020-08-23 09:28:10 +02:00
parent 38c389989c
commit bcd668a622
18 changed files with 247 additions and 161 deletions

View File

@@ -363,9 +363,11 @@ public class FragmentGmail 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)) {
iservice.connect(
provider.imap.host, provider.imap.port,
EmailService.AUTH_TYPE_GMAIL, null,
@@ -376,9 +378,11 @@ public class FragmentGmail extends FragmentBase {
}
Long max_size;
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.connect(
provider.smtp.host, provider.smtp.port,
EmailService.AUTH_TYPE_GMAIL, null,
@@ -397,7 +401,7 @@ public class FragmentGmail 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_GMAIL;
account.user = user;
@@ -446,7 +450,7 @@ public class FragmentGmail 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_GMAIL;
identity.user = user;