PHP Mail Delivery and Read Receipts
Have you ever used the Delivery Receipt / Read Receipt options in Microsoft Outlook? If you haven't ... try it - if your recipient uses Microsoft Exchange, you will get a 'Delivery Status Notification' email immediately, and when the mail is opened, you should receive a 'Read:'
email.
Wouldn't it be great if you could add this functionality to emails sent from your website? Well, there's good news, bad news and worse news.
The good news is that the SMTP standard allows a Message Disposition Notification which specifies a return email address that the mail client can send a confirmation receipt to. This is your Read Receipt and can be implemented in PHP using the following code:
$headers = "From: Your Name<test@test.com>\n";
$headers.= "Disposition-Notification-To: <test@test.com>\n";
@mail("test@test.com", "Receipt Test", "Send me a read receipt", $headers);
>> Posted in Websites at 13:04, and viewed 2,123 times
Next article: Browser Comparison (31 August 2010)
Next Websites article: Sending PHP Email From Apache (02 February 2011)
CommentsAdd your comments