Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delivery reports and read receipts in PHP mail

Tags:

php

email

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.

like image 303
Conrad Avatar asked Jul 03 '09 07:07

Conrad


People also ask

Is delivery report the same as read receipt?

A further thing to note is that delivery reports originate from the system administrator or postmaster or Microsoft Exchange Recipient account (depending on which version of Exchange we are talking about) while Read Receipts come from the recipient that has requested a receipt.

How do I add a read receipt to delivery?

On the File menu, select Options > Mail. Under Tracking, select the Delivery receipt confirming the message was delivered to the recipient's e-mail server or Read receipt confirming the recipient viewed the message check box.

What is PHP mail () function?

PHP mail() function is used to send email in PHP. You can send text message, html message and attachment with message using PHP mail() function.


1 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.

like image 131
Daniel Rikowski Avatar answered Sep 29 '22 01:09

Daniel Rikowski