Email Thread As An Array With EWS Managed API RRS feed

  • Question

  • I am looking for a way to use the EWS Managed API to express an email thread/chain as an array where each element is one email in the thread such that chain[0] is the first email in the array and chain[-2] is the second latest. My goal is to have something akin to chain[-2] from to reliably retrieve the email address of the second latest sender (chronologically) in the chain.

    The best way I can see to do this with the EWS Managed API would be to parse the HTML and chop it up with some string bashing but that seems prone to failure or edge cases.

    Any assistance would be appreciated.

    Wednesday, October 12, 2016 1:07 AM

All replies

  • You can use the Conversation operations and functions in EWS to mostly do that. The problem is the way in which people can use email doesn't usually fit your mythology eg what happens to the first time somebody does a Inline response, also each client will tend to format the response in different ways and also when people are using localized email clients thing like prefixes etc change. Email bodies are at the end of the day are unstructured text so any such processing you apply to it is going to fail in a certain percentage of cases. This isn't anything that is Exchange specific this is the same for every email system


    Wednesday, October 12, 2016 4:21 AM