Internet Direct (Indy)
Home
PreviousUpNext
TIdIMAP4.CloseMailBox Method

Closes the currently selected mailbox.

Pascal
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. 
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.