Internet Direct (Indy)
Home
PreviousUpNext
TIdIMAP4.UIDRetrieveFlags Method

Retrieves stored message flags for a message on the IMAP4 server.

Pascal
function UIDRetrieveFlags(
    const AMsgUID: String; 
    var AFlags: TIdMessageFlagsSet
): Boolean;
Parameters 
Description 
AMsgUID 
Unique message identifier containing flags to be retrieved.
 
AFlags 
Storage for message flags in the specified message UID. 

Boolean - True on success.

UIDRetrieveFlags is a Boolean function used to retrieve stored message flags for the unique message identifier specified AMsgUID. Flags values retrieved from the current mailbox on the IMAP4 server are stored in the AFlags argument. 

UIDRetrieveFlags validates the unique message identifier in AMsgUID to ensuire that it contains a valid value, and raises an EIdNumberInvalid exception when AMsgUID contains an invalid value for use as a UID. 

UIDRetrieveFlags requires that ConnectionState contain the value csSelected, or an EIdConnectionStateError exception will be raised. Use SelectMailBox or ExamineMailBox to select the current mailbox for the IMAP4 account propr to calling UIDRetrieveFlags. 

UIDRetrieveFlags sends the IMAP4 FETCH command to get the flag values for the specified message UID. If a protocol response error occurs while retrieving the flag values, UIDRetrieveFlags sets the return value to False and exits from the method. AFlags will contains an empty set in this condition. 

On successful completion, UIDRetrieveFlags processes the untagged responses in IMAP4 server response, and sets the return value to True. 

Message flags returned in the AFlags argument can be stored in the TIdMessage.Flags property for items in MailBox

Use RetrieveFlags to retrieve message flags for a message using its relative message number. 

Use StoreFlags or UIDStoreFlags to update the stored message flags for a message in the mailbox on the remote IMAP4 server.

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.