Icon ContentStream Property

property ContentStream: TStream

Available In: Server Applications

Specifies a TStream descendant class instance that contains the binary content to include as the MIME part. This property and the Content property are mutually-exclusive. If both properties are assigned a value, then the ContentStream property will take precedence.

Information If this property is assigned a value and the Content-Type header is not specified using the Headers property, it will be automatically set to "application/octet-stream" when the email(s) are sent. In addition, if the Content-Transfer-Encoding header is not specified, it will automatically set to "base64" when the email(s) are sent.

Warning This is just a reference to the TStream descendant class instance, so please make sure that you do not free this class instance before the TMailer Execute method is called.
Image