Solved

How do I filter EmailMessage from Exchange 2007 EWS

Posted on 2010-09-13
3
583 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 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses

624 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