Are there .NET Framework methods to parse an email (MIME)?
Posted
by Neil C. Obremski
on Stack Overflow
See other posts from Stack Overflow
or by Neil C. Obremski
Published on 2009-11-03T19:59:35Z
Indexed on
2010/04/15
10:53 UTC
Read the original article
Hit count: 262
Is there a class or set of functions built into the .NET Framework (3.5+) to parse raw emails (MIME documents)?
I am not looking for anything fancy or a separate library, it needs to be built-in. I'm going to be using this in some unit tests and need only grab the main headers of interest (To, From, Subject) along with the body (which in this case will always be text and therefore no MIME trees or boundaries). I've written several MIME parsers in the past and if there isn't anything readily available, I'll just put together something from regular expressions. It would be great to be able to do something like:
MailMessage msg = MailMessage.Parse(text);
Thoughts?
© Stack Overflow or respective owner