Internet Direct (Indy)
|
Retrieves RFC headers for a specified message and message part.
function UIDRetrievePartHeader( const AMsgUID: String; const APartNum: string; AHeaders: TIdHeaderList ): Boolean;
Parameters |
Description |
AMsgUID |
Unique identifier for the message. |
APartNum |
Relative message part number for retrieved headers. |
AHeaders |
Header values retrieved from the message and message part. |
Boolean - True on Success.
UIDRetrievePartHeader is a Boolean function used to retrieve RFC-compliant headers for a specific message part using the unique identifier for the message in the current mailbox.
AMsgUID specifies the unique identifier (UID) for the message as stored in the current mailbox on the remote IMAP4 server.
APartNum indicates the relative message part number to be used for retrieval of RFC-compliant message headers. APartNum is the ordinal position of the message part as indicated by RetrieveStructure or UIDRetrieveStructure.
AHeaders is used to store the RFC-compliant message headers retrieved for the specified message and message part.
UIDRetrievePartHeader validates the message identifier in AMsgUID to ensure that it contains a valid value, and raises an EIdNumberInvalid exception if the requirement is not met.
UIDRetrievePartHeader 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 RetrievePartHeader or UIDRetrievePartHeader.
UIDRetrievePartHeader sends the IMAP4 FETCH command with the relative message number and data element requests needed to retrieve the message headers for a message part.
The return value for the UIDRetrievePartHeader. method indicates if message headers were successfully retrieved using the specified message identifier and message part number. The return value will be False if a protocol error response (a value other than IMAP_OK) is received during processing in the method.
Text returned in the IMAP4 server response is parsed to determine the size of the message headers for the specified message part. Instances of TIdTCPStream and TIdStreamVCL are created for internal use during retrieval and storage of the message headers in the server response.
Use OnWorkForPart to respond to work events occurring during retrieval of the message part headers.
Use RetrievePartHeader to retrieve message headers for a specified message part using the relative message number for the message.
Use RetrieveStructure or UIDRetrieveStructure to determine all of the message parts available in a message stored on the remote IMAP4 server.
Use RetrievePart or UIDRetrievePart to retrieve the headers and the content for a specified message part.
Use RetrievePartPeek, RetrievePartToFilePeek, UIDRetrievePartPeek, UIDRetrievePartToFilePeek to retrieve a message part without affecting the message flags for the message.
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. |