我正在使用Java邮件API并在移动邮件时收到此错误。 下面是代码和例外。
Session session = Session.getDefaultInstance(properties);
Store store = session.getStore("imap");
store.connect(ipAdd, userid , password);
Folder inbox = store.getFolder("Inbox");
inbox.open(Folder.READ_WRITE);
Folder test = store.getFolder("Emails");
//Create the destination folder if it does not exist
if (!test.exists())
test.create(Folder.HOLDS_MESSAGES);
Message[] msgs = inbox.getMessages(from, to);
inbox.copyMessages(msgs, test);
inbox.setFlags(msgs, new Flags(Flags.Flag.DELETED), true);
inbox.close(false);
test.close(false);
例外: