#native_company# #native_desc#
#native_cta#

Email with an unstoppable “Return Receipt Requested”

By equazcion
on May 3, 2007

Most modern email client software includes a function whereby a user can send an email “return receipt requested.” This is supposed to email the sender (you) to notify you when your email has been read by the recipient.
The problem is that depending on the email client software that your recipient is using, he or she will most likely be given the option to suppress that return-receipt from being sent back to you. This renders the return-receipt system almost completely unreliable as a means of detecting when someone has read your email.
If you have access to a web server that’s running PHP, you can make your own return-receipt system that is (almost) guaranteed to work. What’s more, you can even generate a mass email from PHP, with each email having its own uniquely-distinguishable return receipt, thereby allowing you to keep tabs on which recipients have read the email and which have not.
When it will work and when it won’t
This method relies on only one thing: the recipient’s mail client loading HTML images referenced by URL, as in:

<code><img src="http://www.mysite.com/image.gif" /></code>

Before you groan and say you’ve seen this type of “hack” before, bear with me, as what we’re doing is much cooler and more useful than a simple image reference.
Note that some mail clients do block URL-based images for emails coming from an unrecognized address. Mozilla Thunderbird is among these–it allows the user to choose whether or not to load outside images referenced within the email body.
How to do it
What we’ll be doing is sending an HTML email with an IMG tag within the body. Only, the IMG source will not point to an actual image, but instead it will point to a PHP page on your web server. Start with a new email, and insert the following HTML:

<code><img src="http://www.mysite.com/path/to/phpscript.php" /></code>

Assuming you’ll be using this handy trick more than once for different recipients and/or different occasions, you can optionally add query data to the URL so that you can differentiate between the different notifications you recieve later. And yes, query data included this way will be passed through to the script. Try this:

<code><img src="http://www.mysite.com/path/to/phpscript.php?you=recipient1" /></code>