Internet Direct (Indy) Version 9.0.1 Beta
TIdAttachment.Create
Constructor for the collection item.

constructor Create(Collection: TIdMessageParts; const AFileName: TFileName);
Parameters
Collection: TIdMessageParts
Collection that owns the collection item.

const AFileName: TFileName = ''
File name for the attachment. Default values is ''.

Description
Create is the constructor for the collection item, and is used to create a new TIdAttachment object and add it to the TIdMessageParts collection specified by the Collection parameter.

AFileName is an optional parameter that specifies the initial name of the file to be attached with the TIdAttachment.

Create calls the inherited Create method to initialize the object instance, and assigns AFileName to the FileName property.