Also, do you know if setting flags is possible in hotmail via javamail? I cannot get the following to work:
//...create connection to hotmail
Folder folder = store.getFolder("INBOX");
folder.open(Folder.READ_WRITE);
Message messages[] = folder.getMessages();
messages[0].setFlag(Flags.Flag.SEEN, true); //this doesn't work
folder.close(true);
store.close();
No error is thrown, but the message still appears unread in my hotmail inbox.
You really need to read the javadocs for the com.sun.mail.pop3 package. The POP3 protocol doesn't support the things you're trying to do.