Topic Path: Symbol Reference > Classes > TIdIMAP4 Class > TIdIMAP4 Methods > UIDRetrieveStructure Method > UIDRetrieveStructure Method (String, TIdImapMessageParts)
TIdIMAP4.UIDRetrieveStructure Method (String, TIdImapMessageParts)
function UIDRetrieveStructure(
    const AMsgUID: String; 
    AParts: TIdImapMessageParts
): Boolean; overload;
Unique identifier for the message.
Stores informatiuon about the message parts for the message. 

Boolean - True on success.

UIDRetrieveStructure is an overloaded Boolean function used to return a list of the message parts for the message specified in AMsgUID. 

AParts is used to return the information about the message parts with additional information about the size and content transfer encoding applied to the individual message parts. 

UIDRetrieveStructure validates the message number in AMsgUID to ensure that it contains a valid value, and raises an EIdNumberInvalid exception if the requirement is not met. 

UIDRetrieveStructure requires that ConnectionState contain the value csSelected, or an EIdConnectionStateError exception will be raised. Use SelectMailBox or ExamineMailBox to select a mailbox prior to calling RetrieveStructure or UIDRetrieveStructure. 

UIDRetrieveStructure sends the IMAP4 FETCH command using the specified message number and arguments needed to retrieve the Body structure for the message stored in the current mailbox on the remote IMAP4 server. 

The return value for the method is True if retrieval of the message part list is completed successfully. The return value for the method is False if a protocol error response (any value other than IMAP_OK) is received during processing in the method. 

UIDRetrieveStructure parses text in the IMAP4 server response, and stores the data about the message parts in the parameter provided to the method. 

UIDRetrieveStructure is used in the implementation of other TIdIMAP4 methods, like UIDRetrieveText. UIDRetrieveStructure may also be used to access the structure for the message prior to calling methods that require unique identifiers and content transfer encoding information, like UIDRetrievePart.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.