This is intended for dboyzhang because I know he did this, which is going to be 90% of what I need. This is my first job, so I hope refencing this job is not a violation.
[url removed, login to view]
I need it to
1. check a pop3 account.
2. Pull the email
3. Look for [TicketID:xxxxxxxx]
4. Look for sender's email.
5. insert the TicketID, sender email, message body, into the database.
6. Delete email.
7. Loop until mailbox is empty.
It's going to run as a cron job, so don't output html.
I'm going to be tweaking this when it's done, so it should be readable ;)
This is the code (adodb) I'm using for database inserts. You don't need to worry about doing the insert, I will do that. Just make it generate the SQL statement.
$UpdateSQL = "UPDATE invoices_inv set status_inv = 'paid', pid_pmt=$paymentid_acc, amt_paid_inv = $amt_req_inv where id_inv = $id_inv";
$connShop->Execute($UpdateSQL) or die($connShop->ErrorMsg());
scratch all the database stuff, I'll do that...
Just give me an array with everything about the email.