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

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

 

Description

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

Init

LoadFromFile

LoadFromStream

PathName

OpenStream

TempDirectory

 

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