Solved

How do I filter EmailMessage from Exchange 2007 EWS

Posted on 2010-09-13
3
579 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
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
LeeDerbyshire earned 500 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
how to add IIS SMTP to handle application/Scanner relays into office 365.

785 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