I am looking at CPanel’s “E-Mail filtering” option “Pipe To A Program”

The goal I am working towards is saving the contents of an incoming e-mail 
address into a mySQL table.  I am thinking of trying to program a customer 
contact center application.

Does anyone know what variable the e-mail message is assigned within the 
context of “Pipe To A Program”?  Is there a way to find out?  I can’t figure 
this out.  

What I have tried so far is below:

#!/usr/local/bin/php -q

foreach($_REQUEST as $key => $val) {
     $$key = $val;
$email_body .= "KEY: " . $key . "\r\n";
$email_body .= "VAL: " . $val . "\r\n";
$email_body .= "\r\n";


mail( user@domain , "Test Pipe To Program" , $email_body );

The mail command works, but the e-mail message body is empty.   I am at a loss 
of how to proceed.


Reply via email to