dcsimg

How do I find out the number of deleted messages in a folder?

John Zukowski

Added with JavaMail 1.3, the getDeletedMessageCount() method of Folder gets this for you. A -1 may be returned if the server doesn't support the operation.