Doon's answer below is thorough and accurate. I find these kind of requirements to usually come from stakeholders who only see the "mail" part of email and insist on applying please-sign-here snail mail delivery guarantees to email. I think you're better off talking to you client and explaining the limitations to them.
–
MhmmdAug 19 '10 at 19:05

2

The problem is not in wanting to know if it was opened, the problem is with the "or not". Adding the traditional web bug to an HTML email can tell you if an email was opened. It may have been opened and you not know it, but it is pretty unlikely that the bug would say it was opened when it wasn't. While less than accurate, it is still a good measure. Especially when wanting to compare the success of one campaign to another.
–
Jackson MillerFeb 17 '12 at 2:35

But be aware, that this it's not guaranteed that the user reads the email and loads the image, some email clients don't load images, until the user wants to. And If he doesn't you can't do anything about this. Also if the user uses text mail only this won't work neither.

Using something like VERP you can automate the the bounce processing, to get a fairly good idea if the far end mail server accepted the email. But after that all bets are off. You can't really tell what the email server did with it, (route it to junk/spam folder, put in inbox, silently drop it on the floor/bit bucket, etc..). You could enable read-receipt headers in your email, but that is client specific (and people like me eat/deny them). You can look into using a web bug, for example customize each email with an HTML file, that pulls a remote image, that has a unique id associated with it, but again client specific, most will not load remote images. So unless the email bounces there is no 100% reliable way to tell what happens to the email after it leaves your server.

I am not very familiar with ruby but have written multiple mass mailer apps. You can use a webbug image to get an approximate open rate. Basically it is just a one pixel or transparent image with some tracking information:

<img src="http://mysite/trackingimage.gif?email=x&customer=y">

What I do is make a directory called trackingimage.gif with an index in it that reads and stores the url params and then relocates to the real image.