[PHP] Email-based PHP-Script

2001-12-18 Thread J.Mueller, pro.vider.de GmbH

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 ([EMAIL PROTECTED], Test, $INPUT, From: [EMAIL PROTECTED]); 
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




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Email-based PHP-Script

2001-12-18 Thread Attila Strauss

Hi


http://www.linuks.net/robot.phps

best regards
attila strauss




 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 ([EMAIL PROTECTED], Test, $INPUT, From: [EMAIL PROTECTED]);
 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




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Email-based PHP-Script

2001-12-06 Thread J.Mueller, pro.vider.de GmbH

Hello,

does anybody know of any documentation how to write scripts that
do interact with emails (Majordomo-like), i.e. when an email comes 
to

[EMAIL PROTECTED]

that a script is starting which reads the email and completes tasks
which are defined within the email?

We are using PHP4, Apache and Sendmail.

Thanks a lot.

Juergen
--
pro.vider.de Internetagentur GmbH
Juergen Mueller
Clichystr. 6
89518 Heidenheim
Tel.: 07321 48 08 -72  Fax: -73
---




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Email-based PHP-Script

2001-12-06 Thread Jon Farmer

 does anybody know of any documentation how to write scripts that
 do interact with emails (Majordomo-like), i.e. when an email comes
 to


 [EMAIL PROTECTED]

 that a script is starting which reads the email and completes tasks
 which are defined within the email?

Compile PHP as a binary and pipe the email directly from sendmail into PHP
on STDIN

Jon

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]