Re: Sendmail issue

From: Date: Thu, 02 Mar 2006 15:23:07 +0000
Subject: Re: Sendmail issue
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-231332@lists.php.net to get a copy of this message
Dave Goodchild wrote:
Hi all, I am trying to trigger a php script by sending an email to it. The script commences with #!/usr/local/bin/php to run as a general cgi, and then proceeds to access the email by opening php://stdin. I get all that. However, I am editing the /etc/aliases file to create an email alias for the script by inserting the following line: agecon "/|/home/agecon/dm/ac_incomingphp" ...as per the usual process, the user where my files are is called agecon, so I expect that when I send an email to agecon@***.co.uk it will be passed the the script. I ran sendmail -bi to update the alias after editing but when I send the email nothing happens. Am I missing something. I understand that this is a php/Linux question rather than a pure php inquiry but wonder if anyone has tried to do the same thing.
if your script isn't even getting accessed, it's more of a sendmail/Linux question. I do this for automating quite a few tasks, but with qmail... .qmail-theaddress |/path/to/php/script.php You can read the contents of the email, line for line with... while ( $line = fgets ( STDIN ) ) { // do stuff } -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 jnichel@dotcomholdingsofbuffalo.com

« previous php.general (#231332) next »