If the existing mailbox name contains inferior hierarchical
names (mailboxes under the specified mailbox) then those mailboxes
will also be renamed. For example, if the mailbox "Mail/Pictures"
contains two mailboxes, "Personal" and "Work" and it is renamed to
"Mail/Images" then the two mailboxes under it would be
automatically renamed to "Mail/Images/Personal" and
"Mail/Images/Work".
If the mailbox being renamed is the currently selected mailbox,
the current mailbox will be unselected and any messages marked for
deletion will be expunged. The new mailbox name will then
automatically be re-selected. To prevent deleted messages from
being removed from the mailbox prior to being renamed, use the
UnselectMailbox method to unselect the current mailbox
before calling RenameMailbox. Note that if the rename
operation fails, the client may be left in an unselected state.
It is permitted to rename the special mailbox INBOX. In this
case, the messages will be moved from the INBOX mailbox to the new
mailbox. If the INBOX mailbox is currently selected, the new
mailbox will not automatically be selected. INBOX will remain the
selected mailbox.