SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist lirux's Avatar
    Join Date
    Jan 2001
    Location
    Lisboa : Portugal
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    send email to php script

    Hello. I want 'send' an email to a specific address, and it is sent to php script, and have it handle it..

    this is basically to make a support desk type of script, so when people send an email to, say, support@site.com, it is sent to my email2DB.php script, that gets the from, subject, and body of the email and stores it in the a db (and deletes the email maybe).
    I still don't know how this is done, but I think maybe the script could be set to run every minute and check for new mail... (i don't suppose it's possible for the email to actually go directly to the script, is it?)

    I'm also unsure of what functions to use.. should i use the mail parse functions ( http://www.php.net/manual/en/ref.mailparse.php - terribly documented)


    anyway, if anyone has ever done anything like this..!
    Duarte Carrilho da Graša
    RailsHelp.com: Searchable Rails reference
    CACA: Committee for the Annihilation of Complicated Acronyms

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Location
    European Union
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lirux,

    the script could be set to run every minute and check for new mail
    You are on the right way. Just take a POP3 class[1] or function, customize it and set a cron job to run it regularly.

    [1] Can be found in script archives like Hotscripts.com etc.

    Greetings

    NN

  3. #3
    SitePoint Evangelist lirux's Avatar
    Join Date
    Jan 2001
    Location
    Lisboa : Portugal
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks.. I might be able to get something from some web mail client script, tho after reading this article: http://www.phpbuilder.com/columns/mu...07.php3?page=1 and checking the man for imap again (i didn't notice they had a function listing at the bottom, duh): http://www.php.net/manual/en/ref.imap.php it's sounding much better...


    they mention the requirment of a c-client library from ftp://ftp.cac.washington.edu/imap/ ... clueless here. Tho these IMAP functions look easy like.. (like sh!t - is sh!t easy at all?), this c-client sounds slightly more complex..
    Last edited by lirux; Sep 29, 2002 at 03:49.
    Duarte Carrilho da Graša
    RailsHelp.com: Searchable Rails reference
    CACA: Committee for the Annihilation of Complicated Acronyms


Bookmarks

Posting Permissions

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