August 30th, 2000, 08:58 AM
I d like to create a little script that check a mail box, get message and then update my progres database with data from the email.
I need light on how to receive and process mail automatically.
Thanks by advance.
August 30th, 2000, 01:08 PM
I did this with MySQl, but am not too familiar with Postgres, basically, when someone inserts a record I would stick it into the db with a field called status set to 0, this would make the record inactive to all other apps. Then I would generate an email with the data that the user entered for me to review and two links one with the id=1213(whatever the id is)&action=approve and another
id=1213(whatever the id is)&action=delete
then on the page where the link goes to I can complete an action based onthe paramteres passed
August 31st, 2000, 09:19 AM
I m sorry my message was confusing :
In fact I want a script that run on my server and that will check a mailbox. I fhe find a mail on this mailbox, i d like to read it and to transfert data to my database.
I know how to cron a job, how to read a file, how to update a database ... but not how to check a mail box.
August 31st, 2000, 10:59 AM
In that case you need to a open a connection to your pop server using fsockopen and get the data by reading through the lines of a mail message. There are lots of scripts to check pop servers for mail out there, just find one and tweak it out enough to get it to do what you need.