Internet Direct (Indy)
Home
PreviousUpNext
TIdAttachmentFile.FinishTempStream Method

Resets the internal stream used to access the contents of the message part.

Pascal
procedure FinishTempStream; override;

FinishTempStream is an overridden procedure that implements the interface specified in the TIdAttachment ancestor class. 

FinishTempStream is called when loading or receiving a message with attachments. When a TIdMessage instance is received and processed using TIdMessageClient, or a descendant class, the overridden PrepareTempStream and FinishTempStream methods for the attachment are called. These methods apply to both receiving a message from a remote mail server or accessing a message from a local mail store. Essentially, loading a message and receiving a message are the same - differing only in the type of stream used to read the message contents. 

FinishTempStream ensures that the temporary stream used for processing the contents of the message part is freed after reading values in the message part. 

Use PrepareTempStream to ensure that the temporary stream used for processing the contents of the message part is created prior to reading values stored in the message part. 

The ProcessMessage, ReceiveHeader, and ReceiveBody methods in TIdMessageClient rely on the overridden methods.

TIdAttachmentFile.PrepareTempStream 

TIdAttachment.FinishTempStream 

TIdMessage.LoadFromFile 

TIdMessage.ProcessMessage 

TIdMessage.ReceiveHeader 

TIdMessage.ReceiveBody

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.