recreate a new imap session for each sync

This commit is contained in:
Benjamin Gamard 2018-03-09 19:55:26 +01:00
parent 6b940c4366
commit d497fa8ed7

View File

@ -169,7 +169,7 @@ public class InboxService extends AbstractScheduledService {
properties.put("mail.imap.writetimeout", 30000);
}
Session session = Session.getDefaultInstance(properties);
Session session = Session.getInstance(properties);
Store store = session.getStore("imap");
store.connect(ConfigUtil.getConfigStringValue(ConfigType.INBOX_USERNAME),