Email read notification

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • omerbutt
    Contributor
    • Nov 2006
    • 638

    Email read notification

    hi ,
    as we all work with the registration process , the normal and simple is after registring the user , we ask them to click on a link in the email , now what i am trying is that the user wont have to click any link an as soon he clicks / reads the email i should update the database and activate the user .
    my friend Google told me that this is kind of a email read notification and we have 2 ways to do it,
    1. adding the additional
    headers X-Confirm-Reading-To:
    Disposition-Notification-To:
    or Return-Receipt-To:

    after the From Header.
    but this would send only an email to the email address specified.

    2.Loading an image from the server and running the php script behind that image for example lets say we have a thumbnail generating php script which generates a thumbnail when the file name is given inside the src parameter, we can use that file and enter our code in that file .
    The second one looks more like what i want to do , is there any other more secure way to do this job , google says the second one is more reliable.
    regards,
    Omer Aslam
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    There is no reliable way to do this. Most people have images disabled (and HTML altogether) in emails. Hence why the use of "Click this link to confirm" is ubiquitous.

    Comment

    • omerbutt
      Contributor
      • Nov 2006
      • 638

      #3
      but markus
      comparatively it is a human nature to allow images many people do, we can display text info while registering to alow image while viewing the page , i myself prefer to use Click This link option but the client demands so i am left with these options

      Comment

      • omerbutt
        Contributor
        • Nov 2006
        • 638

        #4
        HI ,
        DONE see the following code i used the captcha kind of logic to acomplish this task i added the following code in the mail body

        [code=php]
        <img src='.SITE_URL. 'mail-read.php?mail_s tamp='.$mail_da te.'&amp;email_ sent_to='.$this->getUserEmailBy Id($user_id).' border="0" alt="" />
        [/code]



        mail-read.php
        [CODE=PHP]
        <?PHP
        include("config .php");
        /* Send headers and output the image */

        if(!empty($_GET )){
        $mail_date = $_GET['mail_stamp'];
        $email_sent_to = $_GET['email_sent_to'];
        $date_read = date('Ymdhis');


        $sql="UPDATE ".EMAIL_LOG S."
        SET
        email_status='R ead' ,
        date_read='".$d ate_read."'
        WHERE
        date_sent='".$m ail_date."'
        AND
        email_sent_to=' ".$email_sent_t o."'
        AND
        email_status='P ending'";
        $r=execute($sql );
        header("Locatio n: ".SITE_URL."ima ges/blank.gif");
        }
        ?>
        [/CODE]

        regards,
        Omer Aslam

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          Just to reiterate, this is not a fail-safe solution. This is evidenced by nearly ALL registration processes requiring the user to explicitly confirm their email address.

          This is a poor solution for the following 2 reasons (there are more, I'm sure):
          1. If images and indeed HTML are disabled by the user/email service, and they likely are due to safety issues, the confirmation will not occur;
          2. It is deceptive and not explicit - the user has no idea what is happening due to the obfuscated process.


          Anyway, just my thoughts.

          Comment

          • omerbutt
            Contributor
            • Nov 2006
            • 638

            #6
            yeah markus
            i had these things already in mind when i was starting it , and this was decided that the normally those will be confirmed that have images enabled and those who havent , let it go
            regards,
            Omer Aslam

            Comment

            Working...