#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    2
    Rep Power
    0
    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.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2000
    Posts
    669
    Rep Power
    15
    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
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    2
    Rep Power
    0
    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.
    Thanks anyway.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jul 2000
    Posts
    669
    Rep Power
    15
    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.

Similar Threads

  1. Sending data from form to database securely!
    By dr.phil in forum PHP Development
    Replies: 2
    Last Post: February 12th, 2004, 07:52 AM
  2. Replies: 3
    Last Post: February 11th, 2004, 09:30 AM
  3. Help using a database and php to update a scores page.
    By deathsythe in forum PHP Development
    Replies: 0
    Last Post: February 2nd, 2004, 03:48 PM
  4. Can't UPDATE data base
    By icaam in forum PHP Development
    Replies: 8
    Last Post: February 1st, 2004, 11:29 PM
  5. Retreiving data from a database
    By boddah in forum ASP Programming
    Replies: 0
    Last Post: January 30th, 2004, 06:55 PM

IMN logo majestic logo threadwatch logo seochat tools logo