MapiMessageItemBase.SetBodyContent

SetBodyContent(string, BodyContentType)

Sets the content of the body.

public virtual void SetBodyContent(string content, BodyContentType contentType)
ParameterTypeDescription
contentStringThe content.
contentTypeBodyContentTypeType 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


SetBodyContent(string, BodyContentType, bool)

Sets the content of the body.

public virtual void SetBodyContent(string content, BodyContentType contentType, bool compression)
ParameterTypeDescription
contentStringThe content.
contentTypeBodyContentTypeType of the content.
compressionBooleanSpecify that the content should be compressed.

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