Short Tag – Web Development Blog

Entries for the ‘E-mail’ Category

PHP MIME E-mail decoding with PEAR’s MimeDecode

In my previous article “PHP e-mail PIPE, cPanel PIPE forwarding” I was explaining how you can create an e-mail PIPE and get the e-mail with PHP.
This is the code you should use to get the email from stdin:

// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd)) {
$email .= fread($fd, 1024);
}
fclose($fd);

Now, we have the content [...]

PHP e-mail PIPE, cPanel PIPE forwarding

E-mail PIPEs are e-mail forwarders that forward an email to an application and not an other email address. Recently I had to develop such a script so I thought I could share what I learned with you.
1.) Setting up the PIPE
Firstly you have to make sure your web hosting provider allows you to create E-mail [...]