Topic Path: Symbol Reference > Classes > TIdMessage Class > TIdMessage Events > OnCreateAttachment Event
ContentsIndexHome
PreviousUpNext
TIdMessage.OnCreateAttachment Event

Event handler triggered to create a new attachment for the message.

property OnCreateAttachment: TIdCreateAttachmentEvent;

OnCreateAttachment is an TIdCreateAttachmentEvent property that represents the event handler signalled when creating an attachment for the message. 

OnCreateAttachment allows the message instance to control the mechanism used for creating attachments in the message during processing in TIdMessageClient.ReceiveBody. 

OnCreateAttachment can be used to create a TIdAttachmentFile or TIdAttachmentMemory instance, as required, and to set the headers for the attachment as detected using TIdMessageDecoder in TIdMessageClient.ReceiveBody. 

Applications must assign a procedure to the event handler property to allow responding to the event notification. When the event handler is unassigned, or the attachment returned by the event handler is unassigned, the CreateAttachmentClass property is used to create a new attachment.

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