How do I get the UID for a specific POP3 message?

John Zukowski

This is dependent on the provider you are using. With Sun's POP3 provider, you can cast the Folder to a com.sun.mail.pop3.POP3Folder and ask for the UID with getUID(Message). This will return the UID as a String, or null if not available.