Script to access IMAP and save all new attachments to DB

In Progress

I'm trying to fill a MySQL database with the daily email reports I get from my ad networks. I want to put a script on my web server, set cron up to run it every day at a certain time, and have it add the newest report data from that email inbox to a MySQL database so I can use that information in a combined ad revenue report I'll make on my own.

I have set up a gmail account specifically for these ad reports. It only gets two emails a day, one from Six Apart Media and another from Technorati Media.

Each message has a specific sender and subject name that never changes. The email body content is useless "here is your report" stuff. One network sends a .txt file, the other sends a .html file. They are delivered every 24 hours.

So my thought is that I need a script that will log in to the Gmail account with IMAP, download all emails newer than the stored timestamp of the most recently downloaded email it read last time, and then write two rows to a database containing the contents of the .html or .xls attachment in those emails.

I imagine the database should have three columns: "filename", "network", and "attachmentcontents". Filename should be the name of the .txt or .html attachment (it includes the report date, so it's useful), network would be either "Six Apart" or "Technorati" (depending on the subject\sender) and the attachmentcontents should be the plaintext contents of the .txt or .html file attached in each respective message.

I have basic-intermediate PHP experience but none using the libraries to access IMAP, and I'd rather not learn it just so I can accomplish a super simple task that I am sure an expert could do pretty quickly :)

Skills: MySQL, PHP, Software Architecture

See more: imap download attachments script, php imap txt attachment, download imap save mysql, php imap save attachment, write my name on your body, web server script, mysql data access, media expert email, i want to write my own, i want to learn php, inbox log in, gmail architecture, email sender software, daily access, contents of a write up, all day every day, access media 3, access database expert, script imap save attachment, php imap save attachments mysql, gmail account name, all on my own, log in to your account, timestamp, save the date

About the Employer:
( 9 reviews ) New York, United States

Project ID: #897230

Awarded to:

GoldenBow

Please check PMB

$60 USD in 1 day
(15 Reviews)
3.8

8 freelancers are bidding on average $124 for this job

sureshdevi

I can do this work. Thanks, Suresh

$125 USD in 3 days
(520 Reviews)
7.3
srinichal

I can deliver the script

$225 USD in 5 days
(91 Reviews)
7.0
zeke

Ready to start immediately and finish within several hours.

$100 USD in 1 day
(145 Reviews)
6.8
arnab0143

--Hello Sir, Please check your pm. Thanks.--

$120 USD in 2 days
(70 Reviews)
6.6
james5400

Good Day, I interested in this project. I can create a php imap/pop3 client to download the emails to your server and insert into a database. I like to share this solution I did from a job I had a few years back w More

$175 USD in 2 days
(6 Reviews)
4.2
elgad

please, check my proposal

$100 USD in 1 day
(2 Reviews)
3.3
db1976

please check pmb,sir

$90 USD in 3 days
(3 Reviews)
2.7