Getting a message count |
Upon establishing a connection to an IMAP server you can retrieve a count of messages in the account mailbox by invoking the Imap#getMessageCount method.
Example
// establish connection imap.connect();
// get number of messages in mailbox int count = imap.getMessageCount(); |