Internet Direct (Indy)
Home
PreviousUpNext
TIdIMAP4.UIDRetrieveEnvelope Method

Retrieves SMTP envelope information for a message in the mailbox.

Pascal
function UIDRetrieveEnvelope(
    const AMsgUID: String; 
    AMsg: TIdMessage
): Boolean;
Parameters 
Description 
AMsgUID 
Message unique identifier to retrieve from the mailbox.
 
AMsg 
Message instance to store the return values. 

Boolean - True on success.

UIDRetrieveEnvelope is a Boolean function used to retrieve the SMTP envelope information for the unique identifier specified in AMsgUID, and to store the information in the message identified by AMsg. 

UIDRetrieveEnvelope validates the message UID in AMsgUID to ensure that it contains a valid value. An EIdNumberInvalid exception will be raised when the UID is invalid. 

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

UIDRetrieveEnvelope calls SendCmd using the IMAP4 FETCH command and arguments constructed from the value in AMsgUID and the IMAP4 fetch data flags required for the operation. UIDRetrieveEnvelope 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, UIDRetrieveEnvelope extracts the headers from the response and parses the header values in the message specified in AMsg. 

Use UIDRetrieveEnvelopeRaw to retrieve and store message envelope data into a specified TStrings argument. 

Use Retrieve or RetrieveEnvelopeRaw to retrieve and store message envelope data for a message identified by its relative message number.

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.