Topic Path: Symbol Reference > Classes > TIdIMAP4 Class > TIdIMAP4 Methods > UIDRetrieveNoDecodeToFile Method
ContentsIndexHome
PreviousUpNext
TIdIMAP4.UIDRetrieveNoDecodeToFile Method

Retrieves the raw encoded contents of a message and stores the contents in a file.

function UIDRetrieveNoDecodeToFile(
    const AMsgUID: String; 
    ADestFile: string
): Boolean;
Parameters 
Description 
AMsgUID 
Unique identifier for the message to retrieve.
 
ADestFile 
File name used to store the message contents. 

Boolean - True on success.

UIDRetrieveNoDecodeToFile is a Boolean function used to retrieve the raw encoded contents of the unique message identifier indicated in AMsgUID, and to store the message contents in the file indicated by ADestFile. 

UIDRetrieveNoDecodeToFile can be used to access the contents of the message without creating object instances in the MessageParts collection. 

UIDRetrieveNoDecodeToFile validates the message UID in AMsgUID to ensure that it contains a valid value, and raises an EIdNumberInvalid exception if the requirement is not met. 

UIDRetrieveNoDecodeToFile 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 UIDRetrieveNoDecodeToFile. 

UIDRetrieveNoDecodeToFile creates a TIdMessage instance used to temporarily store the encoded contents of the specified message. The TIdMessage instance is freed after storing the message contents in the indicated file. 

UIDRetrieveNoDecodeToFile returns True on successful completion of message retrieval. UIDRetrieveNoDecodeToFile returns False if a protocol error response is received during retrieval of the specified message. 

Use UIDRetrieveNoDecodeToStream to retrieve a message without decoding, and to store the contents in a stream.

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