Topic Path: Pending > TIdMessage.CreateAttachmentClass

Class reference used to create new message attachments.

CreateAttachmentClass is a TIdAttachmentClass property that represents the class reference used to create new attachments for the message instance. 

CreateAttachmentClass allows the developer to specify the mechanism used for encoding and decoding attachments, using memory- or file-based attachments. 

CreateAttachmentClass is used when TIdMessageClient (and descendant classes) need to create a new attachment for a message instance. CreateAttachmentClass is used to instantiate the attachment when the OnCreateAttachment event handler has not been assigned or returns a Nil value for the attachment. Otherwise, OnCreateAttachment is used to create the attachment for the message. 

The default class reference, as assigned in Create, is TIdAttachmentFile. Use TIdAttachment, TIdAttachmentFile, or TIdAttachmentMemory as the class reference in CreateAttachmentClass.

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