constructor Create(Collection: TScAttachmentCollection; const FileName: string); reintroduce; overload;

constructor Create(Collection: TScAttachmentCollection; CopyFrom: TStream); reintroduce; overload;



Creates a new TScAttachment object and adds it to the TScAttachmentCollection collection specified by the Collection parameter.

The FileName parameter indicates the name of the file which attachment content is to be loaded. The value of this of parameter will be also set in the PathName property. When FileName is an empty string, the attachment content will be  empty, and you will need to write or load the attachment content using the OpenStream, LoadFromFile, or LoadFromStream. In this case the attachment content will be stored in a file with a random name in TempDirectory.

The CopyFrom parameter accepts a TStream object to load the attachment content from.


See Also








SecureBridge Components, Copyright © 2007-2021 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support