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

Retrieves the body structure for a specified message.

function UIDInternalRetrieveStructure(
    const AMsgUID: String; 
    AMsg: TIdMessage; 
    AParts: TIdImapMessageParts
): Boolean;
Unique identifier for the requested message.
Message instance to store FETCH results from the server.
Message parts that represent the body structure for the message. 

Boolean - True on success.

UIDInternalRetrieveStructure is a Boolean function used to implement retrieving the body structure for the unique message identifier specified in AMsgUID. UIDInternalRetrieveStructure is used in the implementation of the UIDRetrieveStructure method. 

AMsg is the TIdMessage instance to use for retrieving the contents of the specified message. 

AParts is a TIdImapMessageParts instance used to store the message parts that represent the BODYSTRUCTURE response from the IMAP4 server. 

UIDInternalRetrieveStructure requires ConnectionState to contain the value csSelected, indicating a mailbox has been previously selected using SelectMailBox, or an EIdConnectionStateError exception is raised. 

UIDInternalRetrieveStructure uses SendCmd to send the IMAP4 FETCH command with the specified message UID and the BODYSTRUCTURE argument. When a successful FETCH response is received, values in the response are parsed to store message parts that represent the body structure in AParts. 

The return value for the method is True if the body structure for the specified message UID is successfully retrieved using the method.

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