JavaMail Hotmail setFlag not working

1k Views Asked by At

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.

1

There are 1 best solutions below

0
On

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.