Skotlake Posted September 15, 2008 Share Posted September 15, 2008 I was wondering if any of you know about a way to have a received e-mail trigger a PHP script on a server. What I want to do is to BCC my web server on the e-mails I send my customers so that the e-mail can be logged in my CRM database. Does anyone know of a way to do this, or at the least, a good resource to find information on the topic? I've tried searching many times, but can't find an appropriate search string--all the search engines seem to think I'm merely intending to write an e-mail script. Link to comment https://forums.phpfreaks.com/topic/124261-received-e-mail-triggers-php-script/ Share on other sites More sharing options...
kenrbnsn Posted September 15, 2008 Share Posted September 15, 2008 You have to search on "piping email php". If your script is running on Linux/Unix, you set up a forwarding email address, so incoming email will start your script. Your script then will parse the incoming email and do "the right thing". I've written a number of these scripts myself. If you're running on a cPanel host, I can help. Ken Link to comment https://forums.phpfreaks.com/topic/124261-received-e-mail-triggers-php-script/#findComment-641687 Share on other sites More sharing options...
Skotlake Posted September 15, 2008 Author Share Posted September 15, 2008 Thanks for the advice. Unfortunately, my host, 1and1, uses a proprietary system and not cPanel. I looked up and tried to use a tutorial on evolt (http://www.evolt.org/article/Incoming_Mail_and_PHP/18/27914/index.html) that gave instructions on how to do it using Sendmail but it looks like my server doesn't pay any attention to the .forward files. Is there something else I can try? Link to comment https://forums.phpfreaks.com/topic/124261-received-e-mail-triggers-php-script/#findComment-641743 Share on other sites More sharing options...
kenrbnsn Posted September 15, 2008 Share Posted September 15, 2008 Another way to do this, would be to set up a email address to send the information to and use the IMAP functions to retrieve and parse the emails. You would have to use a cronjob to start the script. Once the script is started it would check to see if there is any new messages, and then process them. Ken Link to comment https://forums.phpfreaks.com/topic/124261-received-e-mail-triggers-php-script/#findComment-641814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.