Page 1 of 1

Decode an email

Posted: Thu Feb 09, 2012 3:53 pm
by daj
Hi all,

Firstly, i apologise for the long post, but I wanted to give you an overall feel for what I am trying to achieve. The question is at the end!!

My Plan is to take emails and stores these in MySql for late retrieval and display. The email could be plain text or html and may contain any number of file attachments (or none)!

I have no problem getting the email or saving it into SQL, but my problem is decoding it and extracting any attachments. Ultimately in the SQL database I will have all the usual parts (To, From, etc) plus the body of the email (plain and/or html) and a list of attachments.

Everything I have read so far involves getting the emails from an iMap mail server however my emails are all contained in individual text files.

My question is really to enquiry what classes/scripts are available to help me decode the text file (email) and gather all the information I need.

Any help or pointers much appreciated

Thanks

Re: Decode an email

Posted: Fri Feb 10, 2012 9:22 pm
by Christopher
There are a number of classes that can do this. Check Zend Framework, Symfony, phpClasses.org, etc.