Re: STDIN, email, php as cgi

From: Date: Sun, 01 Oct 2000 05:49:45 +0000
Subject: Re: STDIN, email, php as cgi
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18191@lists.php.net to get a copy of this message
Whatever you're using to detect the certain address or subject needs to pipe the email out to your executable php script. Your php script then receives the email on stdin, so you can have the script do fopen("php://stdin", "r") to get at the email contents. jason > Hi, > > In conjuntion with my ISP, I have figured out how to forward incoming > emails to a certain address, or with a certain subject, etc, to trigger > a php script, using php as a cgi module. > > I have been able to use this php script to send an auto-reply, but now I > want to use the contents of the original email (to, from, other headers > and message body) in the script (example, forward a message on to a > larger group with different headers, etc). > > I believe this can be done via STDIN, and saw a post a long while back, > but have no idea how to get the email as a variable i can slipt and play with. > > > Any help appreciated. > > > Justin French > indent.com.au

« previous php.general (#18191) next »