Re: How to get incoming emails captured by PHP ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adrian wrote:

I have my aliases file set up with the line: ade: |/usr/bin/php,
|/wwwroot/www.domain.com/ade/email.php

(The path to my PHP is correct)

There should only be one | on that line. It should read...

ade: /usr/bin/php /wwwroot/www.domain.com/ade/email.php

And the script it calls (email.php) the code is:

#!/usr/bin/php
<?php

$fd = fopen("php://stdin", "r");

$email = "";

while (!feof($fd)) {

   $email .= fread($fd, 1024);

}

fclose($fd);

?>


Hopefully you realise this script is just reading the email into $email and then not doing anything with it. Mail sent to this script will be lost, so here's hoping that's not the finished article.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux