The SelectMailbox method is used to select a mailbox in
read-write mode. If the client has a different mailbox currently
selected, that mailbox will be closed and any messages marked for
deletion will be expunged. To prevent deleted messages from being
removed from the previous mailbox, use the UnselectMailbox
method prior to selecting the new mailbox.
If you need to select 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.
If an application wishes to update the information returned in the
IMAPMAILBOX structure for the current mailbox, simply call
SelectMailbox again with the same mailbox name. Note that this
will not cause any messages marked for deletion to be expunged.
The special case-insensitive mailbox name INBOX is used for new
messages. Other mailbox names may or may not be case-sensitive
depending on the IMAP server's operating system and
implementation.
To access a mailbox in read-only mode, use the
ExamineMailbox method.