The GetMailboxStatus method enables an application to
obtain status information about a mailbox without having to select
another mailbox or open a second connection to the IMAP server to
examine the mailbox. The information returned is a subset of the
information returned when a mailbox is selected.
If you need to check the status of a mailbox which contains Unicode characters
or symbols, it is recommended you use the Unicode character set when
compiling your application. The mailbox name will automatically be converted to
modified UTF-7 encoding as defined by the IMAP4 standard. If you do
not use Unicode, this method will only accept mailbox names using
modified UTF-7 encoding or UTF-8 encoding.
Note that obtaining status information for a mailbox may be a slow
operation. It may require that server open the mailbox in read-only
mode internally in order to obtain some of the status information.
For this reason, this method should not be used to check for new
messages; use the CheckMailbox method instead.
Some IMAP servers may return an error if you attempt to obtain
status information about the currently selected mailbox. The protocol
standard states that clients should not use this method on the
currently selected mailbox, and should instead use the information
returned by the SelectMailbox or ExamineMailbox
methods.