Topic Path: Symbol Reference > Classes > TIdMessage Class > TIdMessage Methods > DoCreateAttachment Method
ContentsIndexHome
PreviousUpNext
TIdMessage.DoCreateAttachment Method

Implements creating a new message attachment.

procedure DoCreateAttachment(
    const AHeaders: TIdStrings; 
    var VAttachment: TIdAttachment
); virtual;
Parameters 
Description 
AHeaders 
Headers for the attachment.
 
AAttachment 
Attachment created and added to the MessageParts for the message. 

DoCreateAttachment is a procedure used to implement creating a new message attachment. DoCreateAttachment will trigger the OnCreateAttachment event handler, when it has been assigned, to create the attachment using the values in AHeaders. 

If AAttachment does not contain a valid object instance after triggering OnCreateAttachment, CreateAttachmentClass is used to create the attachment in the MessageParts for the message. 

DoCreateAttachment is called in TIdMessageClient (and descendant classes) when an attcahments needs to be created during processing for a message.

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