Results 1 to 4 of 4

Thread: Read Email With PHP

  1. #1

    Thread Starter
    Hyperactive Member NPassero's Avatar
    Join Date
    May 2007
    Location
    NJ
    Posts
    272

    Read Email With PHP

    I am wondering how hard this is to implement-

    Basically want to read the email (set a cron for every 5 minutes to a half hour not sure yet) but then just read the email, parse it out so its all pretty for the db, and then put it into my database.

    - Not sure if it is POP3, IMAP, or what. Very new to this idea.

  2. #2
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    354

    Re: Read Email With PHP

    I have actually done the exact opposite. Have an e-mail in a db then send it out using CRON.

    I am going to assume you have knowledge about php/mysql.

    Anyway, how I would approach is google for a PHP POP3/IMAP client. There is probably a lot out there, and you only need the basic functionality of connecting to the mail server and downloading the e-mail. The GUI implementation doesn't matter. So finding a base mail client is best. That gets your half way. Be sure to make the app executable from the shell, so you are going to need text output instead of html. I would also suggest you log your errors to the db or a text file. Beside, that check your mail from the POP3 client you need to select which mail you was to parse then save it to the db. Once that is done, make your CRON job. If you really want to get fancy then you can do a php/gui backend.

  3. #3

    Thread Starter
    Hyperactive Member NPassero's Avatar
    Join Date
    May 2007
    Location
    NJ
    Posts
    272

    Re: Read Email With PHP

    No need for a gui backend, not gonna try and re-invent the wheel with email. I guess I can forward my mail to a Gmail or something of that sort, would that be efficient or even safe to do ? ( security wise )

    Doesn't seem too impossible

  4. #4
    Addicted Member mfurqan's Avatar
    Join Date
    Oct 2005
    Location
    Pakistan
    Posts
    176

    Re: Read Email With PHP

    hmm.. Why don't you read IMAP functions reference at PHP documentation site?
    Muhammad Furqan Attari.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width