Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I filter EmailMessage from Exchange 2007 EWS

Posted on 2010-09-13
3
Medium Priority
?
587 Views
Last Modified: 2012-08-14
Hello,
I'm trying to get emails though the EWS interface from a Exchange 2007 server. This is working just fine.
But one job is to get the Body text from a email and place that text in another Database. This is also fine, but my problem is that if I (Person A) send a email to person B, and that person B is "replying" to Person A message and include the original message .
Then when I retrieve the message from the Exchange, I get the full message, that’s  of cause normal.
But I want to filter the initiate message from Person A away from the EmailMessage.Body object.  
So that I only get the response from person B.
Is that possible?

Thansk in advance
Torben
0
Comment
Question by:torbenph
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
LeeDerbyshire earned 1500 total points
ID: 33662180
You might try getting the item's InReplyTo property.  I've not tried it myself, but I think this will give you the ItemId of the original message, and you can get the body of that.

Or, you will will just have to do it manually, by lookinf for some text that you are sure will always appear at the beginning of the original message in the reply, such as "----- Original Message -----".  If you find this text, then you could discard everything that follows it.
0
 

Author Comment

by:torbenph
ID: 33776221
Hi,
Thanks for your answer.
I was hoping for at tag inside the email, but then I can place one there myself, as you proposed.
Again thanks for the help.
0
 

Author Closing Comment

by:torbenph
ID: 33776226
It is not possible to get the Original message.. You have to supply it with at tag yourself
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Suggested Courses

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question