Decode an email

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
daj
Forum Newbie
Posts: 5
Joined: Sat Feb 20, 2010 1:43 pm

Decode an email

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Decode an email

Post by Christopher »

There are a number of classes that can do this. Check Zend Framework, Symfony, phpClasses.org, etc.
(#10850)
Post Reply