I couldn't change property BodyFormat of RDOMail object from plain text to html. I have the following code:

RDOMail rdoMessage = rdoFolder.Items.Add("FooType");

rdoMessage.Subject = "Subject";

Also I'm adding some user properties here.

The next line of code not works properly. BodyFormat property stays equal to olFormatPlain(1), instead of olFormatHTML (2).

rdoMessage.BodyFormat = (int)rdoBodyFormat.olFormatHTML;
有帮助吗?

解决方案

When you set the RDOMail.BodyFormat property, Redemption simply sets the PR_MSG_EDITOR_FORMAT proprety. It will not convert the message body to a different format.

To have an HTML message, you actually need to set the RDOMail.HTMLBody property to a properly formatted HTML string.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top