Results 1 to 3 of 3
Related
-
Problem with mail-script Forum: PHP Forum
Replies: 0 -
Redirect after animation Forum: Javascript Forum
Replies: 0 -
Php Mail script being Spammed Forum: PHP Forum
Replies: 7 -
js redirect Forum: Javascript Forum
Replies: 2 -
php mail script help Forum: PHP Forum
Replies: 14
-
11-19-2009, 03:39 AM #1
read incoming mail and redirect to php script
Hi, i am working on a project. i need to read every incoming mail sent to an email address. this mail will be redirected to a php code for processing. do anyone has any idea how to i can write this code in cgi.
thanks
-
11-20-2009, 06:04 PM #2
Re: read incoming mail and redirect to php script
You can do this using Exim and procmail. Check with your server administrator to find out how to use an Exim script on your server.
For example, I have the following .procmailrc file on one of the sites I have developed that processes a specific format of email and redirects those emails to a PHP script:
Code:VERBOSE=off #LOGABSTRACT=yes SENDMAIL=/usr/sbin/sendmail SHELL=/bin/sh MAILDIR=$HOME/theFolder LOGFILE=/home/*********/procmail.log DEFAULT=$HOME/theFolder #Get the subject discarding any leading and trailing blanks #Note: On some systems -xSubject: has to be -x"Subject: " SUBJ_=`formail -xSubject: \ | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'` :0: * ^Subject:.*.Repair Order { :0 fwh | formail -I"Subject: ${SUBJ_}" :0c: $DEFAULT :0: |/usr/bin/php -f /home/*******/public_html/scrape.php $LASTFOLDER }
Code:|/usr/bin/procmail -v
-
03-09-2010, 10:46 PM #3
Re: read incoming mail and redirect to php script
Hi, I am new to this and I need to learn how to redirect the incoming mail to a php script.
I am using LSMTP mail server, on windows server 2003. I need to know how to configure it so that, a mail coming to an email-id to a php script. Please help me out.Last edited by deepak229; 03-09-2010 at 11:12 PM.