Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

EWS Managed API: Setting plain text is stripping XML tags

$
0
0

Hi,

I need to use Exchange managed api to send a plain text email, for which I'm using the following code:

_emailitem.Body = new MessageBody(BodyType.Text, somePlainText);

I thought this was working fine, but sometimes the text in someText might contain XML tags. E.g. The plain text needs to be:

"Hello world<END>FLAG</END>"

(This is because the email is getting sent to a special service and that service requires that the email is plaintext, but uses certain XML tags for special purposes).

Unfortunately, EWS appears to be stripping the tags! How can I send a simple plaintext email via EWS with the exact text I give it without EWS mangling the text?


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>