Web Design Forum: detecting if an email as been opened - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

detecting if an email as been opened Rate Topic: -----

#1 User is offline   ELITE 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 778
  • Joined: 30-March 08
  • Reputation: 0
  • Gender:Male
  • Location:stoke on trent
  • Experience:Intermediate
  • Area of Expertise:Coder

Posted 25 July 2009 - 11:12 PM

Hi all

i have manage to make a php news letter script but would like to make it better for example, i would like to detect which emails have bounced and if possible away to detect when an email that as been sent as been opened any ideas

Thank you
0

#2 User is offline   Connetu_C 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 12-December 08
  • Reputation: 25
  • Gender:Male
  • Location:London, UK
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 26 July 2009 - 11:02 AM

It's very difficult to detect when an e-mail has been opened since that happens on the client-side. In the past, examples would include a return receipt (which now tend to be disabled or blocked from being sent) or an image in an HTML e-mail which had its "src" coded to include some key (e.g. MD5 of the e-mail address) so when that image was loaded in the e-mail, the server could detect who had opened it. Of course, this quickly became abused so now many mail clients block linked images unless the user specifically permits them to be fetched and displayed.

One other way which seems quite common is to provide an HTML view which contains such an image, and also a plain-text link to a webpage containing the same newsletter. So either they choose to load the HTML view (and one of the loaded images will contain the unique ID for tracking purposes), or they can go to the identical webpage which has the unique ID built into the URL.

With regards to detecting blocked e-mails, there are two stages at which an e-mail can be blocked: at your application's sending stage (e.g. the SMTP server may be down or unable to forward mail for the supplied domain), or when your SMTP server attempts to deliver to the destination/next hop (e.g. because the mailbox does not exist or your IP is banned). In the former case your script should immediately become aware of the failure. In the latter case, you may (but won't necessarily) receive a bounce e-mail from your delivery SMTP server back to the Reply-To telling you that delivery was unsuccessful for whatever reason. Not all servers are configured to send bounce e-mails, particularly if your e-mail was binned as spam or the recipient does not exist - the lack of bounce messages is designed to counter spammers who forge sender addresses and try brute force approaches to random address bulk mailing.

If you are successful in getting bounce messages from some clients, you should be able to use POP or IMAP functions to scan the inbox (at the account to which bounces are delivered) for such notifications and take appropriate action. You might find it more convenient to run this from a script or executable as a scheduled task (e.g. cron job), rather than via a PHP/ASP page. You can of course program it in PHP/ASP and then use cron to regularly invoke that URL, if you don't have usage of other script types.
1

#3 User is offline   ELITE 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 778
  • Joined: 30-March 08
  • Reputation: 0
  • Gender:Male
  • Location:stoke on trent
  • Experience:Intermediate
  • Area of Expertise:Coder

Posted 26 July 2009 - 02:42 PM

Thank you for this
0

#4 User is offline   morgano 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 118
  • Joined: 10-October 08
  • Reputation: 18
  • Gender:Male
  • Location:Wales
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 27 July 2009 - 11:49 AM

If you need help with this message me :)
0

#5 User is offline   skidz 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,047
  • Joined: 24-November 08
  • Reputation: 135
  • Gender:Male
  • Location:Derby
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 27 July 2009 - 12:06 PM

Connectu_C is totally hit the nail on the head again.

We do some statictic generation with mass mailing at work using something like:

<img src="http://domain.com/public/mail/image.php?id=434343" />

Then I have an image loading in image.php (using image magik or dg) which hits the database with details.

It's by far not the easiest thing not to do but at the same time not the hardest thing in the world to do.

It really depends on your server side coding knowledge!
0

#6 User is offline   ELITE 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 778
  • Joined: 30-March 08
  • Reputation: 0
  • Gender:Male
  • Location:stoke on trent
  • Experience:Intermediate
  • Area of Expertise:Coder

Posted 27 July 2009 - 07:31 PM

Thanks again i understand what your saying thank you
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users