Archived Forum Post

Index of archived forum posts

Question:

get forward/reply part of an email?

May 24 '13 at 08:45

is there a way to get the reply part or the forward part of an email when i receive an email? because i only need that part of the email, not the original email...


Answer

It depends on how the email is structured (i.e. in MIME parts). If the email is structured so that the reply part or forward part is in an attached message (i.e. a message/rfc822 MIME sub-part), then the email.NumAttachedMessages property will be non-zero, and you can access each attached email via the email.GetAttachedMessage method.

If however, the original email is not present in it's full original form, and it's just the original text that is embedded within the body of the reply/forward, then there's no easy way to get exactly what you want. Any mail program forming the reply or forward is free to construct it in any way it sees fit. Maybe you'll find a common "format" simply because a large majority of email senders use certain programs, such as GMail or Outlook...