Thread: Pipe Emails
View Single Post
  #1  
Old 28th October 2007, 19:52
kippi kippi is offline
Junior Member
 
Join Date: Nov 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pipe Emails

Hey,

I am trying to write a script for my ISPConfig install. I am trying to pipe an e-mail to my php script but I am getting this error:

cannot append message to destination file
/var/www/web7/web/network/email/email.php: cannot open file: Permission denied

This is my config:

.forward:

|/usr/bin/php /var/www/web7/web/network/email/email.php

email.php: chown - postfixostfix chmod - 755

<?php
// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd)) {
$email .= fread($fd, 1024);
}
fclose($fd);
$message = 'bla' ;
mail('chris@skateeast.net', 'Backups', $message);
?>

Any help would be great!!!

Many Thanks

Chris.
Reply With Quote
Sponsored Links