mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 15:17:03 +02:00
@@ -817,7 +817,7 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
isession.setDebug(debug);
|
||||
// adb -t 1 logcat | grep "fairemail\|System.out"
|
||||
|
||||
final IMAPStore istore = (IMAPStore) isession.getStore(account.getProtocol());
|
||||
final IMAPStore istore = (IMAPStore) isession.getStore(account.starttls ? "imap" : "imaps");
|
||||
final Map<EntityFolder, IMAPFolder> folders = new HashMap<>();
|
||||
List<Thread> idlers = new ArrayList<>();
|
||||
List<Handler> handlers = new ArrayList<>();
|
||||
@@ -1889,6 +1889,8 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
db.message().setMessageLastAttempt(message.id, message.last_attempt);
|
||||
}
|
||||
|
||||
String transportType = (ident.starttls ? "smtp" : "smtps");
|
||||
|
||||
// Get properties
|
||||
Properties props = MessageHelper.getSessionProperties(ident.auth_type, ident.realm, ident.insecure);
|
||||
props.put("mail.smtp.localhost", ident.host);
|
||||
@@ -1923,7 +1925,7 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
|
||||
// Create transport
|
||||
// TODO: cache transport?
|
||||
Transport itransport = isession.getTransport(ident.getProtocol());
|
||||
Transport itransport = isession.getTransport(transportType);
|
||||
try {
|
||||
// Connect transport
|
||||
db.identity().setIdentityState(ident.id, "connecting");
|
||||
|
||||
Reference in New Issue
Block a user