PHP vs. qmail

From: Date: Tue, 09 Jan 2001 16:58:48 +0000
Subject: PHP vs. qmail
Groups: php.general 
Request: Send a blank email to php-general+get-33480@lists.php.net to get a copy of this message
Hi! I have a server running qmail and php on which I'm trying to do some php processing of incoming e-mail. I have a virtual domain set up like this: '.qmail-virtualdomain.com-default' which contains the following: '|/usr/local/php-4.0.1pl2/php /home/nille/script.php -q' The script script.php looks like this: <?php mail($SENDER, "A subject", "The body"); ?> And what it does off course is just answering everybody who sends an email to any adress in the domain virtualdomain.com with an e-mail with the subject "A subject" and the body "The body". This isn't very helpful now is it? ;-) In case you wondered the variable $SENDER is a qmail environment variable. What I would like to know is if there is a nice way of parsing out the body of the incoming message and place that into a variable and also the same thing with the subject so that I can process these using som regular expressions and respond to certain keywords using custom templates. Any ideas? - Nille

« previous php.general (#33480) next »