Separate new message text from the EmailMessage Body RRS feed

  • Question

  • Hello,

    I have a windows service that polls Exchange mailbox for new messages via EWS API. Messages could be sent from any email provider (gmail, yahoo, etc), not just Exchange.

    When new EmailMessage comes in, it could be a reply to a lengthy conversation.

    I need to separate the most recent message from the rest of the conversation and display only that part to the user. 

    EmailMessage Body contains the whole conversation and there seems to be no way to extract only what sender typed. 

    Is there a property or any other way to get it?

    If not, I looked thru emails from different email providers, and they have different separators for previous messages in the body of reply.

    It could start with "From:" or "--- Originally sent by" or "On Fri, Aug 12 .... such and such wrote:" , etc.

    Does anyone knows where to find a list of all (or most commonly used) possible separators?

    Any suggestion on how best solve this is appreciated.

    Thank you


    Wednesday, August 24, 2016 6:53 PM

All replies