TScAttachment is a TScCustomAttachment descendant that represents a MIME-encoded attachment.
The TScAttachment and TScTextAttachment classes are used by the TScMailMessage class to store attachments information for the message.
TScAttachment provides methods and properties for storing the attachment content in a file system or local memory.
To store the attachment content in a file you call the respective constructor by passing the filename or by seting the filename later in the PathName property.
To store the attachment content in local memory you call the constructor with the TStream parameter or set the PathName property later to an empty string.
You call the OpenStream method to read/write the attachment content; the method returns a stream containing the attachment content. When the read/write operation is complete you call the CloseStream method.