0
votes

I'm working on an integration project with the EWS Managed API 1.2 with Exchange 2010 and Outlook 2010/2013. We're tying it in with an existing system. Previously, we'd had an option to send meeting notifications. These had a nicely-formatted body, nothing too fancy, but there was a CSS header, some tables, etc. It was loads of fun making that in the first place thanks to Outlook using the Word rendering engine for reasons unknown...

In any case, now we're creating the Appointment directly via EWS-MA. The fun part? The message body of an Appointment is converted to RTF and stripped of nearly all HTML, including the CSS header. I've found that only some tags are supported, and an even more limited set of styles, which can only be done inline. Any CSS style tag in the head is stripped away. We were hoping to maintain the same formatting when the Meeting Requests are sent out, but that's not going to happen.

Is there any way to get around this short of a meticulous formatting rewrite? We're going to have to guess and check with supported styles and tags on this as I don't see any documentation of what is supported. Some styles are stripped entirely, some are converted into something else, and sometimes it comes through as expected. I've wondered if there's a way to utilize an inline attachment to slip the HTML in, but I doubt that's feasible.

1

1 Answers

0
votes

You need to use the HTML BodyType as follows and embed your css inside the html tags using by instance this site http://beaker.mailchimp.com/inline-css


appointment.Body = "your html with inline CSS here";

appointment.Body.BodyType = BodyType.HTML; appointment etc.

I hope it helps :)