Text PartSet Text(Encoding, String) Method
Set the text content and the charset parameter in the Content-Type header.
Definition
Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public void SetText(
Encoding encoding,
string text
)Parameters
Implements
ITextPartSetText(Encoding, String)Remarks
This method is similar to setting the Text property,
but allows specifying a charset encoding to use. Also updates the
Charset property.
Exceptions
| ArgumentNullException |
encoding is . -or- text is . |
| ObjectDisposedException | The TextPart has been disposed. |