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
| Name | Description |
|---|---|
AFilePath | The 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
| Name | Description |
|---|---|
AFilePath | The full path to the file to attach. |
AContentType | The 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
| Name | Description |
|---|---|
AFileName | The filename of the attachment as it will appear to email recipients. |
AContentType | The MIME content type of the attachment. |
ARawContent | The 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
| Name | Description |
|---|---|
AFilename | The filename of the attachment as it will appear to email recipients. |
AStream | The 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
| Name | Description |
|---|---|
AFilename | The filename of the attachment as it will appear to email recipients. |
AContentType | The MIME content type of the attachment. |
AStream | The stream containing the attachment data. |