I'm trying to get a return receipt when the email I send has been read but it's not working. Here's what i've got:
function emailReferral($to, $subject, $body) {
$userInfo = $this->userInfo($_SERVER['PHP_AUTH_USER']);
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: " . $userInfo['name'][0] . "<" . $userInfo['mail'][0] . "\r\n";
$headers .= "Date: " . date("r") . "\r\n"; # fix strange time zone issue at sunmark
$headers .= "Reply-To: " . $userInfo['name'][0] . "<" . $userInfo['mail'][0] . "\r\n";
$headers .= "Return-Path: " . $userInfo['name'][0] . "<" . $userInfo['mail'][0] . "\r\n";
$headers .= "Return-Receipt-To: " . $userInfo['name'][0] . "<" . $userInfo['mail'][0] . "\r\n";
$headers .= "X-Mailer: PHP4\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
if(mail($to, $subject, $body, $headers)) {
return true;
}
}
The message goes through just fine, but no return receipt. Any help would be greatly appreciated.
Thanks in advance.
I realized that I don't think this is possible since I'm sending an e-mail to a public folder on Exchange. I still need a way to do this, so if anyone can think of something please LMK