RE: [PHP] How to get incoming emails captured by PHP ?

From: Date: Wed, 10 May 2006 14:57:22 +0000
Subject: RE: [PHP] How to get incoming emails captured by PHP ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-235895@lists.php.net to get a copy of this message
Thanks, I changed the line to: ade: |/usr/bin/php /wwwroot/www.domain.com/ade/email.php And get this message back different but in essence the same I believe. I know the email.php doesn't do anything, I would love to get it there :) proving to be difficult :) ----- The following addresses had permanent fatal errors ----- |/usr/bin/php /wwwroot/www.domain.com/ade/email.php (reason: 255) (expanded from: <ade@domain.com>) ----- Transcript of session follows ----- Status: 404 Content-type: text/html X-Powered-By: PHP/4.3.11 No input file specified. 554 5.3.0 unknown mailer error 255 -----Original Message----- From: Stut [mailto:stuttle@gmail.com] Sent: Wednesday, May 10, 2006 10:51 AM To: Adrian Cc: php-general@lists.php.net Subject: Re: [PHP] How to get incoming emails captured by PHP ? 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

« previous php.general (#235895) next »