Port to PEAR and more | // +----------------------------------------------------------------------+ // // $Id$ // /* This reads a message from stdin, and passes the request to a soap server residing on a web server, sends the response out as an email You can use this from qmail by creating a .qmail-soapgateway file with: | /usr/bin/php /path/to/email_server.php */ # include the email server class require_once 'SOAP/Server/Email_Gateway.php'; # read stdin $fin = fopen('php://stdin','rb'); if (!$fin) exit(0); $email = ''; while (!feof($fin) && $data = fread($fin, 8096)) { $email .= $data; } fclose($fin); # doit! $server = new SOAP_Server_Email_Gateway(); $server->service($data, 'http://localhost/soap/example/server.php'); ?>