How to determine when someone reads an email you send them.

The Idea:
Most email readers these days support html viewing. However, to prevent people finding out when the email is read, and to prevent the execution of malicious scripts, Javascript, Java, Frames, and Meta tags are usually not supported.
However, there is one thing that won't be removed from html email readers.
the ability to display images.
exploiting this fact, one can set up an "image" on his/her server that is a cgi-script that returns a blank image. Everytime this cgi-script is opened as a picture, it records information that is sent through the http protocol and emails it to the original sender.

How to set up.
The first thing you need is a server on the internet that supports cgi.
Then, you will need a workable cgi-script and a blank image.
here is some code for a cgi script (this assumes you have sendmail, and perl. this was tested on Linux)
#!/usr/bin/perl -w 
#emailtrack.cgi  by jtolds 
$date=localtime; 
open(INP,"host $ENV{'REMOTE_ADDR'}|"); #do a reverse lookup on the remote ip 
                                       #address 
$hostval=; #record it 
close(INP); 
chomp($hostval); #remove endlines 
open(MAIL,"|/usr/sbin/sendmail -t"); #start sendmail 
print MAIL "To: jtolds\@yahoo.com\n";  #mail headers 
print MAIL "Reply-to: jtolds\@yahoo.com\n"; 
print MAIL "From: \"Email Track Service\" \n"; 
print MAIL "Subject: $ENV{'QUERY_STRING'} read \n\n"; 
print MAIL "$ENV{'QUERY_STRING'}\n$date\n$ENV{'REMOTE_ADDR'}\n"; 
print MAIL "$ENV{'HTTP_REFERER'}\n$ENV{'HTTP_USER_AGENT'}\n"; 
print MAIL "NSLOOKUP: $hostval\n"; 
print MAIL "\n"; #send the info to the specified hardcoded email address 
                 #that lists your own info, the remote ip address, the page 
                 #that they viewed it from, the webbrowser they used, and 
                 #the results of the reverse lookup 
close(MAIL); 
system "netsay Email Track";  #execute a command. in this case, start my voice 
                              #synthesis program and have it say Email Track 
print "Location: http://yourserver.com/~me/blank.gif\n\n"; #redirect the 
                                               #browser to the blank image 
put the code in your cgi directory, and place the image somewhere. make sure to change the code so that it is compatible with your setup.

now, in each email you send, add this image to the end:
http://yourserver.com/~me/cgi-bin/emailtrack.cgi?info
where info is some random informational text quote that you pick differently perhaps for each email
everytime this picture is viewed, an email is sent to you.

Log in or register to write something here or to contact authors.