Internet Direct (Indy)
Home
PreviousUpNext
TIdIMAP4.InternalRetrieveStructure Method

Retrieves the body structure for a specified message.

Pascal
function InternalRetrieveStructure(
    const AMsgNum: Integer; 
    AMsg: TIdMessage; 
    AParts: TIdImapMessageParts
): Boolean;
Parameters 
Description 
AMsgNum 
Relative message number for the requested message.
 
AMsg 
Message instance to store FETCH results from the server.
 
AParts 
Message parts that represent the body structure for the message. 

Boolean - True on success.

InternalRetrieveStructure is a Boolean function used to implement retrieving the body structure for the relative message number specified in AMsgNum. InternalRetrieveStructure is used in the implementation of the RetrieveStructure 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. 

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

InternalRetrieveStructure uses SendCmd to send the IMAP4 FETCH command with the specified message number and the BODYSTRUCTURE argument. When a successful FETCH response is received, values in LastCmdResult 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 number is successfully retrieved using the method.

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.