PHP5 POP3/MIME email decoding script

In Progress Posted May 26, 2010 Paid on delivery
In Progress Paid on delivery

I need a bulletproof PHP5 script that will read the contents of a POP3 mailbox, decode the messages consistently and save all attachments to any message to a folder. This may sound easy, but decoding MIME messages can be tricky. This script has to be *bulletproof* and well-documented so it can be updated in the future. You're welcome to use any existing POP3/MIME decoding libraries (except for the ones that require MailParse) as long as you can meet the requirements.

## Deliverables

This script needs to:

* Access a POP3 mailbox and retrieve a set of messages (determined by a configuration variable)

* Decode each message into an associative array with the following values

* from_email - the email address the message was sent from

* from - the name of the sender (if any)

* to - the email address the message was sent to (the mailbox is a catch-all, so it will receive messages sent to multiple email addresses)

* unique_id - a unique id for each message

* text_content - text content of the message (if any)

* html_content - html content of the message (if any)

* attachments - array

* count - number of attachments

* array of attachment names and sizes

* date - the date and time the email was received

* urls - array of any URLs included in the message body

* count - number of URLs

* array of URLs

* Save each attachment to a folder with the attachment name prefixed by the unique id of the message it's from, e.g.

* unique_id . '-' . attachment_name

* Delete each message after it's been processed.

Each of these bits of functionality should be wrapped up as separate functions so I can merge this script with other parts of my code. Again, I can't stress how important it is to consistently decode the messages into the array I've described above. I could do a half-ass job of this on my own; I want a professional to do it right. :)

Ideally, you will set up your own catch-all mailbox so I can test the results of the script.

I use the following constants for configuration, it would be great if you could use these too:

EMAIL_USER - username for the mailbox

EMAIL_HOST - mailbox host name

EMAIL_PASS - password for the mailbox

ATT_FILE_PATH - server file path for saving the attachments.

Engineering PHP Project Management Software Architecture Software Testing Web Hosting Website Management Website Testing

Project ID: #3456503

About the project

5 proposals Remote project Active May 30, 2010

5 freelancers are bidding on average $151 for this job

webexpert78

See private message.

$127.5 USD in 5 days
(102 Reviews)
6.1
Joycejolly

See private message.

$140.25 USD in 5 days
(1 Review)
1.3
developmentsl

See private message.

$148.75 USD in 5 days
(0 Reviews)
0.0
webdevelopesllph

See private message.

$170 USD in 5 days
(2 Reviews)
0.0
hostmogura

See private message.

$170 USD in 5 days
(0 Reviews)
0.0