Does anyone of you know off by hand what mail headers to add in order to get a read receipt and delivery report? This now being when you use the normal PHP mail function. No fancy add-on script / class like phpMail.
4 Answers
For the reading confirmations:
You have to add the X-Confirm-Reading-To
header.
X-Confirm-Reading-To: <address>
For delivery confirmations:
You have to add the Disposition-Notification-To
header.
For usage details see RFC 3798.
General tip for stuff like this:
Use the mail client of your choice to generate an e-mail with the desired parameters, send it to yourself and look at the mail source.
There you can find the necessary headers added by the feature you are looking for. Then read the RFC or google for specific details on the header in question.

- 1
- 1

- 71,375
- 57
- 251
- 329
-
9Quality post. Still useful 2 1/2 years later. – Indigenuity Jan 14 '12 at 03:24
-
8Quality post. Still useful 4 1/2 years later. – Amal Murali Oct 16 '13 at 13:19
-
8Quality post. Still useful 6 1/2 years later. – zanderwar May 13 '15 at 05:33
-
4Quality post. Still useful 7 years later. – mega6382 Nov 16 '15 at 06:22
-
4Quality post. Still useful 8 years later. – brycejl Jul 30 '16 at 14:29
-
is it still working after in 2017? I just need to confirm because it isn't working from my side. – user2617214 Jan 20 '17 at 06:03
-
Maybe a little late, but @user2617214, it is working with me – rrr Nov 10 '17 at 09:00
-
Disposition-Notification-To ist not a delivery confirmation, but a request for a reading confirmation = Message Disposition Notification (MDN). RFC3798 2.1 states: The presence of a Disposition-Notification-To header in a message is merely a request for an MDN. RFC3798 2 says: Message disposition notifications are requested by including a Disposition-Notification-To header in the message. Further information to be used by the recipient's MUA in generating the MDN may be provided by also including Original-Recipient and/or Disposition-Notification-Options headers in the message. – David Lang May 10 '22 at 12:31
-
This is an MDN that is being sent by the recipients Mail User Agent (MUA), it's a reading confirmation. A delivery confirmation is a Delivery Status Notification (DSN) that is automatically sent from the Mailserver, also known as bounce message like "550 user unknown" or "5.2.2 mailbox full". Delivery Notifications are also sent via this layer and not from the MUA. – David Lang May 10 '22 at 12:31
Gmail blocks methods such as:
img src="http://yourdomain/tracking.php?id=EMAIL_ID" width="0" height="0"
This is because the image is retrieved from a proxy. Since the URL contains variables and not a real image file, the image will not be shown. The tracker would be useless.
I've personally experienced this as I build my own newsletter system.

- 11
- 1
-
Nik dod you found any solution to do that ? im making mine newsletter system and i nee dto verificate it was opened or not – Jasar Orion Aug 20 '17 at 21:29
-
You could use an URL like http://example.com/tracking/email_without_symbols/image.png and configure your http server to serve such files. Should possible with nginx – Benibr Apr 25 '18 at 13:08
What you could also do is embed an img (assuming that you're sending the email as text/html) tag that has in its source the following:
<img src="http://yourdomain/tracking.php?id=EMAIL_ID" width="0" height="0" >
where tracking.php is a file that would be opened when the email is also opened (assuming images are activated) and then you can catch on your side the parameter id and check it against a stored id (database or file).
I am doing this for a newsletter manager to count the number of views.

- 540
- 5
- 11
-
3This could potentially increase the risk that the email is considered spam, as you're embedding a img with zero width and height. – Jens Wegar Dec 13 '13 at 15:47