#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171

    How to check if the email has been opened or not!


    Can someone please explaoin this? Thanks

    (Excuse 
 couldnt delete them! )
    Php Script for Check Email open
    How to check that send email is open by receiver or not

If we send email use Php mail() function and want that you get information when receiver open that mail or want to keep record of open mail send in mass sending of mail using Php mail() function.

    To do that we use following code.
    





    PHP Code:
    $to=""//email receiver id

    $subj=""// subject of mail

    $msg=""// message that send to receiver


    $senderheaders *= "From: news@example.com\r\n";


    $senderheaders .= "Content-type: text/html\r\n";

    &
    #8232;$senderheaders.="<img src=\"http://www.example.com/trackemail.php?receiverId=$id\" width=\"1\" height=\"1\" />"; 

    &#8232;
mail($to,$subj,$msg,$senderheaders);
?> 
    

In above code we send image of 1*1px with the header of the mail. when receiver open that mail that will send back to tracking file of sender site and tell them that email is check by receiver.
    Last edited by zxcvbnm; February 12th, 2013 at 12:38 AM.
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,136
    Rep Power
    1990
    That's standard email tracking. It sets up a 1x1 pixels image to be displayed in the HTML email body. The URL for that image is a PHP script that records the details that are set up in the URL, then uses PHP's built-in image libraries to output a simple image to the browser (in this case the email client). It's basically the industry-standard and it used to almost everyone.
  4. #3
  5. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6352
    Note that some people (like me) have images disabled in their email client specifically to stop weird creepy tracking like this.

    Gmail blocks images by default as well.

    Comments on this post

    • PaulGer agrees
    • Jacques1 agrees
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  6. #4
  7. For POny!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    Amsterdam
    Posts
    416
    Rep Power
    115
    You could instead of a 1x1px
    use an image (or images) that actually state something (so they are pretty much forced to enable images if they are curious). Although it's not very nice to track people this way without knowing it. It's forbidden in my country, Probably also in the rest of the EU.
  8. #5
  9. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171
    Originally Posted by ManiacDan
    Note that some people (like me) have images disabled in their email client specifically to stop weird creepy tracking like this.

    Gmail blocks images by default as well.
    What do you recommend?
  10. #6
  11. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    See aeternus' post.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  12. #7
  13. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    What do you recommend?
    You can't track people who have images turned off (can't, as in, it is literally impossible). The image solution is really the only workable option.

    You could instead of a 1x1px use an image (or images) that actually state something (so they are pretty much forced to enable images if they are curious).
    The disadvantage of this is that if the person doesn't enable images they don't get the information at all, whereas if you send the information as text, at least if they don't enable images they still get the information.

    Normally when you're sending emails of the type that use tracking pixels, you care more than the recipient does about whether or not they read the information.

    It's forbidden in my country, Probably also in the rest of the EU.
    It's not illegal in the US. OP is from Australia I think, I don't know about legality there, but my guess is it's not illegal. IIRC, it's only been illegal in the EU for a short time, and the EU tends to be more strict about that sort of stuff than other places.
    Last edited by E-Oreo; February 12th, 2013 at 09:21 PM.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo