tags:

views:

738

answers:

3

I am going to create a script that sends out an email. I am currently using PHPMailer. I have been told that they would like the email to request a receipt from the user indicating they read it. (like what you often see in outlook). I have no clue if this is possible. Can anyone tell me if this is possible and if so how to do it?

Thanks!!

+3  A: 

I'm not sure if you can use them in PHP or not a quick search showed this:

Disposition-Notification-To: [email protected]

however they are not reliable in any way as most email clients either ignore them or just allow the user to hit 'cancel' to sending a reply. I've only really seen it used in corporate/enterprise type env with Notes or Outlook.

Just something to consider, but depends on your application.

Jakub
This is right, SwiftMailer also confirms it: http://swiftmailer.org/docs/read-receipts
Alix Axel
Even if they're not reliable, you should be able to request (not require) them.
Nathan Long
+2  A: 

See $ConfirmReadingTo in PHPMailer documentation

RioTera
+1  A: 

In PHPMailer you use $ConfirmReadingTo. You need to set it equal to the email address you want the confirmation sent to. Ex:

$ConfirmReadingTo: [email protected]

But some email clients (such as gmail) will just ignore this.

The best way to get a confirm from every email sent would be to send an HTML email and use a graphic to track which emails have been opened. The graphic source would be a script which you would let you check who has read the email. Ex:

<img src="http://www.yourSite.com/[email protected]&amp;SUBJECT=The_Email_Subject" border="0" height="1" width="1">

emailConfirm.php could then generate an email to be sent to your email address.

Josh Curren
A lot of email clients will block a graphic image that looks to be tracking the email, as it's a common technique used in SPAM to confirm a valid address.
Vex