Discuss this help topic in SecureBlackbox Forum
POP3: Get mailbox statistics
There are 3 methods available to get messages count in the mailbox and their total size. Call TElPOP3Client.GetMailboxSize() to get total size of the messages in the mailbox. Call TElPOP3Client.GetMessageCount() to get the number of messages available in the mailbox. Call TElPOP3Client.GetMailboxInfo() method to get both the number of messages and their total size.
Examples:
C#:
// get the number of messages
Console.WriteLine("Messages on server: {0}", pop3.GetMessageCount());
// get total size of the messages
Console.WriteLine("Total size used on server: {0} bytes", pop3.GetMailboxSize());
// get both at once, the number of messages and total size used
int messages = 0;
long total = 0;
pop3.GetMailboxInfo(out messages, out total);
Console.WriteLine("{0} messages takes {1} bytes on the server", messages, total);