Tuesday 24 November 2009

PHP Email Read ReceiptPHP Email Read Receipt

Left QuoteAnyone who's ever used Microsoft Outlook will be familiar with the Delivery Receipt and Read Receipt options, but how can we implement them with PHP? Sadly, the delivery receipt is an Exchange feature, but a read receipt we can do.

<?php

$headers = "From: Your Name<test@test.com>\n";
$headers.= "Disposition-Notification-To:<test@test.com>\n";

$body ="Body Text";

mail("your@email.com", "Read Receipt Test", $body, $headers);

?>


For privacy reasons, RFC 3798 defines the disposition notification as 'optional' which means that in most email clients the user will get the option of sending the reply or not.

It's not perfect, but that's how to get a read receipt using PHPRight Quote

Next article: Mailto: Syntax (16 March 2010)

Next Websites article: PHP Mail Delivery and Read Receipts (09 April 2010)

CommentsComments

Add your comments

Name

Comments

Question

8 + 5 = (this security question stops automated submissions)