mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 11:28:41 +01:00
Fixed JavaMail session
This commit is contained in:
@@ -210,7 +210,7 @@ public class FragmentAccount extends Fragment {
|
||||
// Check IMAP server
|
||||
List<EntityFolder> folders = new ArrayList<>();
|
||||
if (account.synchronize) {
|
||||
Session isession = Session.getDefaultInstance(MessageHelper.getSessionProperties(), null);
|
||||
Session isession = Session.getInstance(MessageHelper.getSessionProperties(), null);
|
||||
IMAPStore istore = null;
|
||||
try {
|
||||
istore = (IMAPStore) isession.getStore("imaps");
|
||||
|
||||
@@ -244,7 +244,7 @@ public class FragmentIdentity extends Fragment {
|
||||
// Check SMTP server
|
||||
if (identity.synchronize) {
|
||||
Properties props = MessageHelper.getSessionProperties();
|
||||
Session isession = Session.getDefaultInstance(props, null);
|
||||
Session isession = Session.getInstance(props, null);
|
||||
Transport itransport = isession.getTransport(identity.starttls ? "smtp" : "smtps");
|
||||
try {
|
||||
itransport.connect(identity.host, identity.port, identity.user, identity.password);
|
||||
|
||||
@@ -242,7 +242,7 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
Properties props = MessageHelper.getSessionProperties();
|
||||
props.put("mail.imaps.peek", "true");
|
||||
//props.put("mail.imaps.minidletime", "5000");
|
||||
Session isession = Session.getDefaultInstance(props, null);
|
||||
Session isession = Session.getInstance(props, null);
|
||||
// isession.setDebug(true);
|
||||
// adb -t 1 logcat | grep "eu.faircode.email\|System.out"
|
||||
|
||||
@@ -658,7 +658,7 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
return;
|
||||
|
||||
Properties props = MessageHelper.getSessionProperties();
|
||||
Session isession = Session.getDefaultInstance(props, null);
|
||||
Session isession = Session.getInstance(props, null);
|
||||
MimeMessage imessage = MessageHelper.from(msg, isession);
|
||||
ifolder.appendMessages(new Message[]{imessage});
|
||||
|
||||
@@ -718,7 +718,7 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
|
||||
// Create session
|
||||
Properties props = MessageHelper.getSessionProperties();
|
||||
Session isession = Session.getDefaultInstance(props, null);
|
||||
Session isession = Session.getInstance(props, null);
|
||||
|
||||
// Create message
|
||||
MimeMessage imessage;
|
||||
|
||||
Reference in New Issue
Block a user