Internet Direct (Indy) Version 9.0.1 Beta
TIdIMAP4.CheckMsgSeen
Indicates if the specified message has been read.

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

Returns
Boolean - True when the message has been read.

Description
CheckMsgSeen is a Boolean function that indicates if the message specified by AMsgNum in the current mailbox has been read. 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.