Skill Level Required - Moderate to High
To make this work you must first set an email on your account forward to a file.
To achieve this login to your cPanel / Web Panel and select "Forwarders" under the Mail category.
Than click the button called "Add Forwarder"
Enter email address and select the domain to the email and then click "Advanced Options" at the bottom.
Now select the option "Pipe to a Program" and enter the path from the "Home" folder (behind the public_html folder) and enter the directory address to where the scripted is located on your account.
Click "Add Forwarder"
Your Pipe email scripted should contain the on the first line only the following: " #!/usr/bin/php -q" followed by on the next line with "" and no close "?>" in the scripted.
The Following is an example of a Piping scripted:
// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
$email .= fread($fd, 1024);
mail('email@example.com','From my email pipe!','"' . $email . '"');
Note: you need all directory leading to the scripted including the piping file need to have 755 permission set for this to work.
Also the piping scripted must be in the cgi-bin folder for it to work with out returnning a rebount message.