Skip to main content
Version: 2.1

TSESV2Attachment

Class in AWS.SESV2

SESV2 Attachment class.

Ancestors​

Properties​

ContentDescription​

property ContentDescription: string

ContentDisposition​

property ContentDisposition: string

ContentId​

property ContentId: string

ContentTransferEncoding​

property ContentTransferEncoding: string

ContentType​

property ContentType: string

FileName​

property FileName: string

RawContent​

property RawContent: TBytes

Constructors​

Create​

constructor Create; overload;

Constructor for TSESV2Attachment.


constructor Create(const AFilePath: string); overload;

Creates a new attachment by loading a file from disk with auto-detected content type.

The content type is automatically determined from the file extension. The filename property is set to the file's base name without the path.

Parameters

NameDescription
AFilePathThe full path to the file to attach.

constructor Create(const AFilePath, AContentType: string); overload;

Creates a new attachment by loading a file from disk with explicit content type.

The FileName property is set to the file's base name without the path.

Parameters

NameDescription
AFilePathThe full path to the file to attach.
AContentTypeThe MIME content type of the attachment.

constructor Create(const AFileName, AContentType: string; const ARawContent: TBytes); overload;

Creates a new attachment with the specified filename, content type, and data.

Parameters

NameDescription
AFileNameThe filename of the attachment as it will appear to email recipients.
AContentTypeThe MIME content type of the attachment.
ARawContentThe binary content of the attachment file.

constructor Create(const AFileName: string; const AStream: TStream); overload;

Creates a new attachment by reading data from a stream with auto-detected content type.

The content type is automatically determined from the filename extension. The stream is read from its current position to the end. The stream position is not modified after reading.

Parameters

NameDescription
AFilenameThe filename of the attachment as it will appear to email recipients.
AStreamThe stream containing the attachment data.

constructor Create(const AFileName, AContentType: string; const AStream: TStream); overload;

Creates a new attachment by reading data from a stream with explicit content type.

The stream is read from its current position to the end. The stream position is not modified after reading.

Parameters

NameDescription
AFilenameThe filename of the attachment as it will appear to email recipients.
AContentTypeThe MIME content type of the attachment.
AStreamThe stream containing the attachment data.