mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 03:19:24 +01:00
Added encryption none
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user