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

Indicates if the specified message has been read.

function CheckMsgSeen(
    const AMsgNum: Integer
): Boolean;
Parameters 
Description 
AMsgNum 
Message number to be checked. 

Boolean - True when the message has been read.

CheckMsgSeen is a Boolean function that indicates if the message in the currently selected mailbox specified by the relative message number in AMsgNum has been read. 

CheckMsgSeen may raise an EIdNumberInvalid exception if AMsgNum contains an invalid value (0 or a negative number). 

CheckMsgSeen requires that the ConnectionState contain the value csSelected, or an EIdConnectionStateError exception will be raised. 

CheckMsgSeen calls SendCmd, after incrementing the IMAP command counter, using the IMAP FETCH command with the FLAGS attribute. CheckMsgSeen returns True when the server response indicates that the flags for the message contains the TIdMessageFlag value mfSeen. 

Use UIDCheckMsgSeen to check the flags for a message by its unique identifier.

Exceptions 
Description 
With the message RSIMAP4NumberInvalid when AMsgNum is invalid. 
With the message RSIMAP4ConnectionStateError and the value from GetConnectionStateName when ConnectionState indicates a mailbox has not been selected. 
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.