start your php script like this:

#!/usr/bin/php
<?php
//file must be 755

// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd)) {
$email .= fread($fd, 1024);
}
fclose($fd);

....

?>

the
"#!/usr/bin/php"
must be at the begging of the file, and the path will depend on your
system


On Apr 18, 9:59 pm, Michael <[email protected]> wrote:
> I wish to Pipe some emails from a Postfix MTA to a PHP script.
>
> I need to access the content of the email as a file handle (Like fopen)
>
> How is this coded in the PHP script?
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to