Search code examples
c#.netoutlook-redemptionoutlook-2013

RDOMail unable to change BodyFormat property


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;

Solution

  • 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.