Topic Path: Symbol Reference > Classes > TIdIMAP4 Class > TIdIMAP4 Methods > UIDCheckMsgSeen Method
TIdIMAP4.UIDCheckMsgSeen Method

Indicates if the specified message has been read.

function UIDCheckMsgSeen(
    const AMsgUID: String
): Boolean;
Message unique identifier to be checked. 

Boolean - True when the message has been read.

UIDCheckMsgSeen is a Boolean function that indicates if the message in the currently selected mailbox specified by the unique identifier in AMsgUID has been read. 

UIDCheckMsgSeen may raise an EIdNumberInvalid exception if AMsgUID contains an invalid value for use in a unique identifier. 

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

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

Use CheckMsgSeen to check the flags for a message by its relative message number.

With the message RSIMAP4NumberInvalid when AMsgUID 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.