Getting only and only the latest body of an email in a email chain on outlook web

On Outlook web version, I want the body of only the latest email from a email chain. Currently if I use mail.Header(“Body”) its returning an empty string. If I use mail.Headers(“HTMLBody”) or mail.Headers(“PlainText”) it is returning all the email bodies in the email chain(that includes all the replies on that email). I only want the text or HTML of the latest version or latest reply to that email. I am using IMAP to login into outlook web

Hi @terane

Did u tried mail.Body.ToString ?

Yes that is the first thing I tried. It returns a “” string. Is there anything else I can use

I think if the reply includes the original email I am not sure if there is a way to exclude that when you return the email body. You could maybe use regex or string manipulation to look for the headers from the previous email if they are included and then delete that text, but I am not sure how robust that would be.