Topic Path: Pending > TIdIMAP4.RetrieveEnvelopeRaw@Integer@TStringList

Retrieves SMTP envelope information for a message in the mailbox.

Message number to retrieve from the mailbox.
Storage for raw envelope data. 

Boolean - True on success.

RetrieveEnvelopeRaw is a Boolean function used to retrieve the SMTP envelope information for the relative message number specified in AMsgNum, and to store the information in the TStrings instance specified in ADestList. 

RetrieveEnvelopeRaw validates the relative message number in aMsg to ensure that it contains a positive non-zero value. An EIdNumberInvalid exception will be raised when the realtive message number is invalid. 

RetrieveEnvelopeRaw requires that ConnectionState contain the value csSelected, indicating a mailbox has been successfully selected and authenticated. RetrieveEnvelopeRaw can raise an EIdConnectionStateError exception if a mailbox has not been selected and/or authenticated for the current user. 

RetrieveEnvelopeRaw calls SendCmd using the IMAP4 FETCH command and arguments constructed from the value in AMsgNum and the IMAP4 fetch data flags required for the operation. RetrieveEnvelope reads the multi-line response from the IMAP4 server, and verifies that the initial response matches the command issued using SendCmd. When they are the same, RetrieveEnvelope extracts the SMTP headers from the response and parses the header for storage in ADestList. 

Use RetrieveEnvelope to retrieve and store message envelope data into a specified TIdMessage argument. 

Use UIDRetrieve or UIDRetrieveEnvelopeRaw to retrieve and store message envelope data for a message identified by its unique identifier (UID).

ConnectionState RetrieveEnvelopeRaw UIDRetrieveEnvelope UIDRetrieveEnvelopeRaw EIdNumberInvalid EIdConnectionStateError

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