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

Requests a checkpoint for the currently selected mailbox.

function CheckMailBox: Boolean;

Boolean - True on success.

CheckMailBox is a Boolean function that requests a checkpoint for the currently selected mailbox. A checkpoint refers to the IMAP4 server-specific housekeeping associated with a mailbox that is not normally executed as part of each IMAP4 command. 

Please note that this function does absolutely nothing on most if not all IMAP servers because they do not leave anything to "housekeeping" routines. This function is part of the IMAP specification but appears to be totally pointless since the specification does not define what functions may depend on this function being called first. 

CheckMailBox requires that ConnectionState contain the value csSelected or an EIdConnectionStateError exception wil be raised. 

CheckMailBox executes the IMAP4 CHECK command, and sets the return value to indicate if the server response in LastCmdResult is IMAP_OK.

Exceptions 
Description 
Raised 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.