Skip to content
Advertisement

PHP: Check who had read sent email?

I am sending email to some users and wants to know who had read it, means if some one had read that email then a log file will maintain which contain the email address of that user with date/time/IP. For this I send a javascript function with the email (html template) which just alert the email address of the user when ever a user opens that email like:

JavaScript

the html template works fine and shows an alert popup on page load but it does not works if I use to send this html template.

And I only want to solve this issue using PHP5.x.x / javascript, no other software or third party tool. Any help..?

Advertisement

Answer

Add Header to email:

JavaScript

As mentioned above it’s not reliable and it’s better to do something like this:

JavaScript

And log it in a database, although again this is restricted by the email client’s ability to show images and sometimes it may even put the mail into junk because it doesn’t detect an image… a workaround that would be to actually outputting an image (say your logo) at the end of that script.

Edit: A quick lookup at the phpmailer class gave me the following:

JavaScript

but it’s the same as the Disposition-Notification-To method above.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement