Xojo Plugin
Xojo Plugin
Get the Total Size of a POP3 Mailbox
See more POP3 Examples
Demonstrates the Chilkat MailMan.GetMailboxSize method, which returns the total combined size, in bytes, of all messages currently stored in the POP3 mailbox — also known as the POP3 maildrop size. This example configures the POP3 connection and reads the total size.
Background: POP3 reports the maildrop size via its
STAT command, which returns both a message count and the aggregate byte size. Knowing the total up front is useful for estimating download time and bandwidth, or for deciding whether to fetch everything at once versus one message at a time — especially over slow links or when the mailbox is large.Chilkat Xojo Plugin Downloads
// Demonstrates the MailMan.GetMailboxSize method, which returns the total combined size, in
// bytes, of all messages currently stored in the POP3 mailbox (the POP3 maildrop size).
Dim mailman As New Chilkat.MailMan
// Configure the POP3 server connection.
mailman.MailHost = "pop.example.com"
mailman.MailPort = 995
mailman.PopSsl = True
mailman.PopUsername = "user@example.com"
mailman.PopPassword = "myPassword"
System.DebugLog("Total mailbox size (bytes): " + Str(mailman.GetMailboxSize()))
// Note: Explicitly connecting/authenticating is optional. Chilkat MailMan automatically
// connects and authenticates -- using the property settings above -- whenever a server
// operation requires it. Calling the explicit connect/authenticate methods can still be
// helpful to determine whether a failure occurs while connecting or while authenticating.