MapiMessageItemBase.SetBodyContent

SetBodyContent(string, BodyContentType)

Sets the body of the item in the specified format.

public virtual void SetBodyContent(string content, BodyContentType contentType)
ParameterTypeDescription
contentStringThe text of the body.
contentTypeBodyContentTypeThe format of content.

Exceptions

exceptioncondition
ArgumentNullExceptioncontent is null or empty.

Remarks

The plain-text body, the RTF body and the compressed RTF property are all updated. After HTML content is set, BodyRtf returns that HTML encapsulated in RTF.

See Also


SetBodyContent(string, BodyContentType, bool)

Sets the body of the item in the specified format, optionally compressing it.

public virtual void SetBodyContent(string content, BodyContentType contentType, bool compression)
ParameterTypeDescription
contentStringThe text of the body.
contentTypeBodyContentTypeThe format of content.
compressionBooleantrue to store the RTF body compressed.

Exceptions

exceptioncondition
ArgumentNullExceptioncontent is null or empty.

Remarks

The plain-text body, the RTF body and the compressed RTF property are all updated. After HTML content is set, BodyRtf returns that HTML encapsulated in RTF.

See Also