convert mail to xml

4.5k views Asked by At

I'm using a TCP IP .NET program to retrieve mails as text formated from a pop3 server. I'd like to convert the messages I receive into XML.

Anybody knows of a email text message to XML file - with headers, from, to, subject, body and html body (no attachments though)?

Alternatively, I'd like to find a email XSD shema I could use...

TIA

2

There are 2 answers

0
Alex On BEST ANSWER

If you have a library which can serialize and deserialize XML<->MIME, this becomes really simple. For instance, MailMessage class of MailBee.NET MIME can do this. The whole library is paid but mime functionality is free if used without POP3, IMAP, etc.

http://www.afterlogic.com/mailbee-net/mime-component

3
kelloti On

Here is a tutorial for learning XSD; it happens to use email as an example. These sorts of examples are easy to find. I don't think there is a standard XSD for email, although there might be something I missed over at w3.org