Topic Path: Symbol Reference > Classes > TIdIMAP4 Class > TIdIMAP4 Methods > CloseMailBox Method
ContentsIndexHome
PreviousUpNext
TIdIMAP4.CloseMailBox Method

Closes the currently selected mailbox.

function CloseMailBox: Boolean;

Boolean - True on success.

CloseMailBox is a Boolean function used to close the currently selected mailbox. CloseMailBox requires that ConnectionState contain the value csSelected, or an EIdConnectionStateError exception will be raised. 

CloseMailBox calls SendCmd to execute the IMAP CLOSE command, and sets ConnectionState to csAuthenticated on successful completion. 

The return value for the method is True on successful completion of the IMAP4 CLOSE command.

Exceptions 
Description 
With the message RSIMAP4ConnectionStateError and the value from GetConnectionStateName. 
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.