dcsimg

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

John Zukowski

This is dependent on the provider you are using. With Sun's IMAP provider you can cast the Folder to a com.sun.mail.imap.IMAPFolder and call the getUID(Message) method. This will return the identifier as a long.