convert mail to xml
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 fil开发者_如何学Goe - 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
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
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
精彩评论