Reading attachments from EML files

zeocrash

Member
Joined
Sep 15, 2004
Messages
8
OK
Im writing a program for an sms messaging company. Basically the program takes in XML files, (either sent in by email, or generated by an http post to the server). The server processes the xml files and sends them off to the sms provider using a 3rd party API.

The server is hosted on the mail server used to recieve the messages, so Instead of recieveing the mail via pop3 or IMAP i can just lift it straight out of the mail servers folder.
The emails are stored as eml files, and as far as i can tell the attachments are in base 64


My problem is that i cannot figure out a way of extracting the xml files from the emails.
The xml files themselves are sent in with various formats (the contents is in xml, the extention could be anything)

Could someone help me.
-Zeo
 
Convert.FromBase64String

You can use Convert.FromBase64String to convert a base64-encoded attachment into its original file data. Knowing nothing about the EML file type I can only speculate as to how you retrieve the base64 from the EML file beforehand.

Good luck :)
 
Back
Top