Discussion
Cognizant
GB
Last activity: 18 Nov 2020 15:16 EST
MS Graph API returns mail message body as HTML code instead of plain text
Hi All,
We have done following steps successfully:
a) Email account connectivity for receiver via MS Graph API.
b) Email listener is up and running using email account for reading email via MS Graph API
c) work case is getting created using email listener
Issue observed:
Email body is appeared in html format instead of text format.
Though we have configured format as text in email listener. Also in request form in Service Email rule HTML Body message is configured as "inline-text"
While checking online got below link:
https://stackoverflow.com/questions/51491794/microsoft-graph-api-returns-mail-message-body-as-html
above link suggests below setting:
requestMessage.Headers.Add("Prefer", "outlook.body-content-type='text'");
How to add above setting in Service email form in header fields . I can see some options in help article but not clear instructions on it.
Please share your thoughts if you have seen similar issue and you have some ideas/solution for this.
.