I am trying to get body text from webmail to message box. but getting html content. Have tried using item.Headers(“HTMLBody”).ToString
If you are trying to extract the body text of an email from a webmail service and are only getting the HTML content, you may need to parse the HTML to extract the text. One way to do this is to use an HTML parsing library such as BeautifulSoup for Python or the HtmlAgilityPack for C#.
You can parse the HTML and then use the get_text() method to extract the plain text from the email.
Another way is to use regular expression to search and match the text between the tags
You can also try using the item.Headers(“TextBody”) or item.Headers(“TextBodyAscii”) properties instead of “HTMLBody” to extract the plain text version of the email body.
Please let me know if you need further assistance.