Topic Path: Pending > TIdIMAP4.RetrieveNoDecodeToStream@Integer@TStream
ContentsIndexHome
PreviousUpNext
TIdIMAP4.RetrieveNoDecodeToStream@Integer@TStream

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

Parameters 
Description 
AMsgNum 
Relative message number to retrieve.
 
AStream 
Stream used to store the message contents. 

Boolean - True on success.

RetrieveNoDecodeToStream 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 stream indicated by AStream. 

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

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

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

RetrieveNoDecodeToStream 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 stream. 

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

Use RetrieveNoDecodeToFile to retrieve a message without decoding, and to store the contents in a file.

ConnectionState RetrieveNoDecodeToFile EIdNumberInvalid EIdConnectionStateError TIdMessage.NoDecode

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