reporting opened emails

Posted on 2012-08-16
Last Modified: 2016-03-18
I know that mail open statistics do not work in gmail client because images are turned off by default

but how does sendgrid, constant contact
report that mail is open

maybe they use an image
but how does the image relate to an id which is unique
so I can tell which user opened email

could you answer in php
Question by:rgb192
    LVL 12

    Accepted Solution

    Not sure what you mean by responding in PHP, but generally what happens with products like  constant contact is that they put something in the html of the email (like the image you suggest) the causes a GET on the server.  Usually they will create a URL to that image contains  a unique string that is tied to the user's email address, the campaign being run etc.

    The web server can either have a rule to respond to all GETs that match the pattern with the image and log a message in the web server logs.  Then all you need to do is parse the log files for the unique IDs and any records that match the key tied to email address indicates an open.

    Alternatively a web application could be written that responds to that same pattern and does the logic (parsing the URL request for the token) and logging that information to a database or whatever you desire.

    To build out that functionality in PHP you would need to
    - Create a program that generates the unique string for each email address and campaign combo - like an MD5 hash
    - Create a program to generate and send the emails with the unique id in the email body
    - Create the web application or web server rule to respond to the image

    Author Closing Comment


    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    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…
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now