-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
Describe the bug
When I connect to mailbox 163, due to server restrictions, I need to call store.id() and folder.id(), which can get messages normally. However, when I close folder and call store.isConnected(), folder.open() will throw an exception: "B4 NO EXAMINE Unsafe Login. Please contact [email protected] for help", which means that the folder.id() I set earlier does not work, but I have no way to reset it.
To Reproduce
Steps to reproduce the behavior:
- Create store and call store.id
- Create folder and call folder.id
- Call folder.isConnected()
- Call folder.close()
- Call folder.open(),throw exception
Expected behavior
After the folder is closed, it can be opened normally
Screenshots
Desktop (please complete the following information):
- OS: Windows
- Version 2.0.1
Mail server:
- Protocol being used: imaps
- Vendor/product: 163
- Mail service URL: mail 163.com
Additional context
Session session = Session.getInstance(props);
Store store = session.getStore("imaps");
store.connect(emailServiceType.getImap(), username, password);
IMAPStore imapStore = (IMAPStore) store;
Map<String, String> iam = new HashMap<>();
iam.put("name","111");
iam.put("version","1.0.0");
iam.put("vendor","111");
iam.put("support-email","[email protected]");
imapStore.id(iam);
// folder
IMAPFolder folder = (IMAPFolder) store.getFolder(folderName);
folder.open(Folder.READ_ONLY);
synchronized (folder) {
folder.id(iam);
}
store.isConnected();
if (folder.isOpen()) {
folder.close(false);
}
if (!folder.isOpen()) {
folder.open(Folder.READ_ONLY);
}Metadata
Metadata
Assignees
Labels
No labels
