Solved

Check if email has been read by recipient

Posted on 2011-02-16
8
1,231 Views
Last Modified: 2012-05-11
Hi Experts,

I'm writing a newsletter app with PHP.  Wondering if there is any easy way yo track how many users actually read your email?  I know how to track if user has clicked the link ... but it seems there is no easy way to tell whether user actually read your email or not.

Any idea?

Thanks
aska
0
Comment
Question by:aska1979
8 Comments
 
LVL 4

Expert Comment

by:andreizz
ID: 34905144
Unless they click on a link back to your website i don't think there is a way.
0
 
LVL 4

Expert Comment

by:d4011
ID: 34905173
If you send those emails as HTML (and the user displays the email as HTML), you can track that.
Have a look here: http://en.wikipedia.org/wiki/Web_bug
0
 
LVL 14

Expert Comment

by:dejaanbu
ID: 34905195
you can request a read receipt when sending the mail... i think with

$headers .= "Disposition-Notification-To:<xxx.xxx@xxx.com>\r\n";

 you can check this. but 100% no guarantee i think so

0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 34

Assisted Solution

by:Beverley Portlock
Beverley Portlock earned 100 total points
ID: 34905673
The "standard" way is to assign a unique id to each newsletter and, as others have said, link this back to something on the webserver. Since each link is unique you can then determine which user clicked on the link, so you might have something like

http://www.example.com/12345/image.jpg  or http://www.example.com/image-12345.jpg

but you need to configure the server to deal with these fake images and to send the real image out, or make the image a 1x1 pixel so it does not matter if it fails to retrieve the image but you still get the hit. You then need to analyse your log files.

I would bother with any of this. I would take out a subscription with graphicMail or constantContact since they already do all of this for you including statistical analysis of the mailshot result. They offer free trial accounts and the fees are quite cheap. Why re-invent the wheel?


0
 
LVL 8

Accepted Solution

by:
rationalboss earned 400 total points
ID: 34907151
http://www.spypig.com/
http://www.getnotify.com/
http://whoreadme.com/
http://www.readnotify.com/

And if you're willing to pay, as bportlock suggested:
http://www.constantcontact.com/index.jsp
http://www.graphicmail.com/site/default.aspx

And if you want your own, you can create a PHP file that you can use as an image. You just need to send individual emails to each user. The images you will use are dynamic. This is an example:

Your domain is example.com and you will be using the tracking images as an email header banner in example.com/logo123456789.jpg.

To do this, you need to setup .htaccess for a rewrite rule (just put this inside .htaccess):
RewriteEngine On
RewriteRule ^logo([0-9]+).jpg$ trackemail.php?id=$1

Now, inside your trackemail.php:
<?php
$id = (int)$_GET['id'];
sql('UPDATE emails_sent SET email_read=1 WHERE emailid=$id');
if (@mysql_affected_rows() == 0) {
   // return a 404 error.
   header("HTTP/1.0 404 Not Found");
   exit;
} else {
   header('Content-type: image/jpeg');
   readfile('images/logo.jpg');
   exit;
}
?>

Open in new window


Of course, each time you send an email, you INSERT a new record in emails_sent :)
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 34907874
I cannot add much to this discussion except to say that I have experience in this area, both sending my own email messages and using Constant Contact.  The first experience with my own automation dates back to 1998.  In 2002, the year of spam, sending emails became a workload-intense thankless task full of non-value-added exercises.  In 2008, I started using Constant Contact.  It is so simple you can just give the account information to the interns and say, "Do it!"  And it is embarrassingly inexpensive.  They have full-time staff who handle all the issues.  They do all the tracking and reporting.  It's a great service.

In other words, you do not have to reinvent this wheel.  Your life will be easier and you will save a great deal of money if you use CC.  There are competitors like Mailchimp, etc.  Probably any of them can do the job for you. My staff happens to like Constant Contact best.
0
 

Author Comment

by:aska1979
ID: 34913109
hi rationalboss,

thanks for the suggestion on ConstantContact service. i wasn't aware there are such service on the market already. i might go for that

but speaking of the codes, i still want to understand how it works.  can you explain to me a little bit more?
i dont really understand how the RewriteRule works
when you put this line in .htaccess, exactly what is it doing?
RewriteRule ^logo([0-9]+).jpg$ trackemail.php?id=$1


take your example, if i have the image example.com/logo123456789.jpg in my html email
when user open the email, it will ask server to return images/logo.jpg , right?
but what's the value of variable $1 that being passed into trackemail.php?

thanks!

0
 
LVL 8

Expert Comment

by:rationalboss
ID: 34913213
It is the 123456789. So, when you have:

example.com/logo123456789.jpg, it will actually open:
example.com/trackemail.php?id=123456789

The 123456789 serves as your tracking ID for the email. :)
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question