PHP email Headers - delivery option

Homer_J picture Homer_J · Feb 15, 2012 · Viewed 9.1k times · Source

I've added the following code to our PHP Mail app which sends out emails:

$email_header .= "Disposition-Notification-To: $from"; 
$email_header .= "X-Confirm-Reading-To: $from"; 

However, we are not receiving any 'Delivered' or 'Read' confirmations.

Any thoughts?

Thanks,

H.

Answer

Mike picture Mike · Feb 15, 2012

The reason that you are not receiving any confirmations is that most people choose not to send read receipts. If you could, from your server, influence whether or not this happened, a spammer could easily identify active and inactive email addresses quite easily.

However, another reason why this might be failing, if sending read receipts is enabled, is that you need to include a new line at the end of every line:

$email_header .= "Disposition-Notification-To: $from\r\n"; 
$email_header .= "X-Confirm-Reading-To: $from\r\n";