The GetMailboxSize method may require a significant amount
of time to calculate the mailbox size if there are a large number of
messages in the mailbox. If the specified mailbox is not currently
selected, then the current mailbox is unselected, the new mailbox is
selected and the size calculated, and then the original mailbox is
re-selected. This will have the side-effect of causing any messages
marked for deletion to be expunged from the mailbox.
Because it can potentially result in long delays, it is not
recommended that an application calculate the mailbox size unless it
is absolutely necessary.