Running php program when mail received

From: Date: Mon, 20 May 2002 03:38:15 +0000
Subject: Running php program when mail received
Groups: php.general 
Request: Send a blank email to php-general+get-98411@lists.php.net to get a copy of this message
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.

« previous php.general (#98411) next »