Seperation of messages

Nov 14, 2010 at 6:11 AM

Hi Guys !

Is it possible to divide a multi time replied message to it's containing messages?
For Example: I send and email to my friend and he/she replies me. when I receive it, I want to display only the the new part in my program.

Is there any way to do this in C#Mail ?

Coordinator
Nov 21, 2010 at 5:33 AM

In mail format,the data does not divided.
So,you must separete the text data your own program.
Generally,by using regular expression.(In System.Text.RegularExpression)

In some case,the replied mail data is attached.
The reply mail is included as MimeContent and is set content-type is message/rfc822.
You can get this MimeContent by Contents property of Pop3Message object  with call GetAttachedContents static method.

example
Pop3Message mg = new Pop3Message();
List<Pop3Contents> l = Pop3Message.GetAttachedContents(mg.Contents, el => el.ContentType == "message/rfc822");

regard.