UnselectMailbox Method  
 

Unselects the current mailbox.

Syntax

object.UnselectMailbox( [Expunge] )

Parameters

Expunge
An optional boolean argument which determines if deleted messages will be expunged from the mailbox. A value of true specifies that messages that have been marked for deletion will be removed from the mailbox. A value of False specifies that no messages will be removed from the mailbox. If this argument is omitted, the default action is to expunge deleted messages from the mailbox.

Return Value

A value of zero is returned if the method succeeds. Otherwise, a non-zero error code is returned which indicates the cause of the failure.

Remarks

The UnselectMailbox method unselects the current mailbox. Once the mailbox has been unselected, no messages in that mailbox can be accessed, and by default any messages which have been marked for deletion are removed.

See Also

MailboxName Property, ExamineMailbox Method, SelectMailbox Method