On Wed, 31 Oct 2001 22:04, Adrian D'Costa wrote:
> On Mon, 29 Oct 2001, David Robley wrote:
> > On Sat, 27 Oct 2001 03:23, JSheble wrote:
> > > A while ago an email came through here about how to parse out email
> > > message from a php script.  The thing that was mostly of interest
> > > to me is the ability to send an email to a php script, I guess
> > > through a sendmail alias?  I asked how to accomplish this, and
> > > never saw an answer come through.  So I'd like to ask again :o)
> > >
> > > Does anybody know what would be required or necessary to send an
> > > email to an address that would run a php script?
> >
> > You say sendmail, so do it thusly:
> >
> > Edit /etc/aliases and add a line like
> >
> > phpmail: "| /pathto/your/php/script"
> >
> > and run newaliases to update your alias database.
> Actually, I am still trying to figure this out when I get time.  What I
> did was:
> phpmail: "| lynx -dump > /pathto/your/php/script"
> But the problem is nothing appears to be capture in the script.  Or
> rather in what format does this mail arrive.  I even tried to write it
> to a file but nothing is written.

The pipe feeds the incoming data to the script as standard input - $DEITY 
knows what lynx would do with that, but black holes seem to be the most 
likely destination. Your script needs to be an executable, standalone 
which reads and parses data from stdin and which is the direct recipient 
of info from the pipe.

> > You'll also need to compile php as a standalone, and put as the first
> > line of your php script
> >
> > #!/path/to/php -q
> What if we need both version??

As my colleague on the eastern seaboard has noted already, you can have a 
module and a standalone on the same system.

David Robley      Techno-JoaT, Web Maintainer, Mail List Admin, etc

   Catscan: searching for kitty.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to