Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I filter EmailMessage from Exchange 2007 EWS

Posted on 2010-09-13
3
Medium Priority
?
591 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 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
This video discusses moving either the default database or any database to a new volume.
Suggested Courses

972 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