Re: Running php program when mail received
| From: | Manuel Lemos | Date: | Mon, 20 May 2002 04:17:50 +0000 |
| Subject: | Re: Running php program when mail received | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98414@lists.php.net to get a copy of this message | ||
On 05/20/2002 12:38 AM, Cditty wrote:
Hello all. I am trying to write a small program that will run everytime an email is received at a certain mailbox on my sever. I had this running at one time, but for some reason, it will not run. I am not getting any errors and I can't figure out what is going on. Below is the code that I am trying to run. #!/usr/bin/php -q ### CHANGE VALUES OF THE FOLLOWING VARIABLES ### $to = "webmaster@redhotsweeps.com"; $subj = "message"; $hdrs = "From: webmaster@redhotsweeps.com\n"; $msg = "This is going out"; mail($to, $subj, $msg, $hdrs); This is what is returned in the maillog file. May 19 22:29:07 server1 sendmail[3502]: WAA03501: to="|/path/to/file/imap.php", delay=00:00:00, xdelay=00:00:00, mailer=prog, stat=Sent Can anyone point me in the right direction? The script has been chmod 755.What happens when you do /usr/bin/php -q /path/to/file/imap.php ? -- Regards, Manuel Lemos