MapiMessageItemBaseSetBodyContent Method (String, BodyContentType)

Sets the content of the body.

Namespace:  Aspose.Email.Mapi
Assembly:  Aspose.Email (in Aspose.Email.dll) Version: 21.6
Syntax
public virtual void SetBodyContent(
	string content,
	BodyContentType contentType
)

Parameters

content
Type: SystemString
The content.
contentType
Type: Aspose.Email.MapiBodyContentType
Type of the content.
Exceptions
ExceptionCondition
ArgumentNullExceptionthrows if the specified content string is null or empty.
Remarks
It is provided for setting of the content of the body message in RTF, HTML or Plain Text formats. When setting a value, the values of PR_RTF_COMPRESSED, PR_RTF_DECOMPRESSES, PR_BODY properties are updated as well. Note, after the value in HTML format is set, BodyRtf property returns the value which is encoded within RTF.
See Also