Internet Direct (Indy)
Home
PreviousUpNext
TIdIMAP4.RetrieveNoDecodeToFile Method

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

Pascal
function RetrieveNoDecodeToFile(
    const AMsgNum: Integer; 
    ADestFile: string
): Boolean;
Parameters 
Description 
AMsgNum 
Relative message number to retrieve.
 
ADestFile 
File name used to store the message contents. 

Boolean - True on success.

RetrieveNoDecodeToFile is a Boolean function used to retrieve the raw encoded contents of the relative message number indicated in AMsgNum, and to store the message contents in the file indicated by ADestFile. 

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

RetrieveNoDecodeToFile validates the message number in AMsgNum to ensure that it contains a positive non-zero value, and raises an EIdNumberInvalid exception if the requirement is not met. 

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

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

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

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

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.