"Email-based PHP-Script"
| From: | J.Mueller, pro.vider.de GmbH | Date: | Tue, 18 Dec 2001 18:45:32 +0000 |
| Subject: | "Email-based PHP-Script" | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-78119@lists.php.net to get a copy of this message | ||
Hello List,
I'm currently trying to setup a script which is processing incomming emails.
So I setup PHP as CGI and did configurate the email like
robot "|/path/to/the/script.php"
The little testscript I tried looks like that:
<?
$fp = fopen("php://stdin","r");
while (!feof($fp))
{ $BUFFER = fgets($fp);
$INPUT .= $BUFFER;
}
mail ("info@receiver.de", "Test", "$INPUT", "From:
test@sender.de");
fclose($fp);
?>
The error which I get is
/path/to/the/script.php: cannot open ?: no such file
554 5.3.0 unknown mailer error 2
Does anybody have some PHP code which would work to readout incomming emails
or knows that's wrong with my little script?
Thanks a lot.
Juergen