Add the contents of the message:
-
For plain text or HTML, use the TextData property, which is an instance of %FileCharacterStreamOpens in a new tab. You do not need to specify the TranslateTable property of this stream; that occurred automatically when you specified the character set of the mail message.
The system automatically translates the character encoding to the encoding that you specified in the previous step.
-
For binary data, use the BinaryData property, which is an instance of %FileBinaryStreamOpens in a new tab.
Note that %FileCharacterStreamOpens in a new tab and %FileBinaryStreamOpens in a new tab are deprecated but are still supported for use in this way. It is not recommended to substitute different stream classes for this use case.
Tip:
When you specify the Filename property of the stream, be sure to use a directory to which the users will have write access.
To work with these properties, use the standard stream methods: Write(), WriteLine(), Read(), ReadLine(), Rewind(), MoveToEnd(), and Clear(). You can also use the Size property of the stream, which gives you the size of the message contents.