Announcement

Collapse
No announcement yet.

mail opened?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mail opened?

    hi everyone ...

    i would like to ask if there is any possible ways that i can know the emails that i have sent out ... have been opened by the recipient? and when it is opened ... i would like to have a link or something that point to the php script that record the number of opened emails ... something like the below ...
    HTML Code:
    <img src="http://www.something.com/openedmail.php?email=$email&open=yes">
    on the openedmail.php ... i would like to have a mysql connection as i want to store that number inside a database ...

    but first ... i need to know if i can know if the mails are opened by the recipient?

    thanks for the help ...

  • #2
    and i would like to know the bounce emails as well ...

    so, i have this ... [email protected] doesn't exist ...
    PHP Code:
    $mailto "[email="aa@aa.com"][email protected][/email]";
    $mailsent mail($mailto"test""testing message");
    if (! 
    $mailsent) {
      
    $bounce_count += 1;
      
    $bounce_email $mailto;

    will this work?

    thanks ...

    Comment


    • #3
      knowing whether an email has been opened or not is possible, in fact it's how a lot of spammers verify your email address
      they put what's called a webbot in an html email which once the email is opened sends a variable to a script on their web server letting them know the mail has been opened and makes sure that email address stays on the list

      i'd imagine it to be something like this
      Code:
      <img src=http://someserver.com/[email protected] border="" height="0" width="0" />
      Visit NoizPollution.com // Your Music Source

      Do not PM or email me for support, you will not receive a response. Please post all requests for support in the main vBulletin forums or via the support system in the main members section of the site.

      Comment


      • #4
        i have tested it out ... but it seem that i dont get any result ... i have check the database and there is no data inserted. here are the files:

        test.php [ i use it to send the email out. ]
        PHP Code:
        require('class.phpmailer.php');
         
        $mail = new PHPMailer();
         
         
        $mail->IsSMTP();
         
        $mail->Host "myserver.com";
         
        $mail->SMTPAuth true;
         
        $mail->Username "smtp_user";
         
        $mail->Password "smtp_pass";
         
         
        $mail->From "[email="from_email@server.com"][email protected][/email]";
         
        $mail->FromName "from_name";
         
        $mail->AddReplyTo("[email="from_email@server.com"][email protected][/email]""from_name");
            
         
        $mail->Subject "test mail open ...";
         
        $mail->WordWrap 50;
         
        $mail->AddAddress("[email="to_email@server.com"][email protected][/email]""to_name");
         
         
        $mail->IsHTML(true);
         
         
        $today date("Ymd");
         
        $body "testing 123 ... <br><br>";
         
        $body .= "<img src=\"[url="http://myserver.com/email/mailopen.php?id=123&date=$today"]http://myserver.com/email/mailopen.php?id=123&date=$today\[/url]" border=\"\" height=\"0\" width=\"0\">";
         
        $mail->Body $body;
         
        $mail->Send();
         
         
        $mail->ClearAddresses();
         
        $mail->ClearAttachments();
         
         print 
        "Mail Sent ..."
        and here is the mailopen.php file
        PHP Code:
        $host "localhost";
         
        $user "dbuser";
         
        $pass "dbpass";
         
        $data "dbname";
         
         
        ############ DATABASE CONNECTION ############
         
        if ($link mysql_connect($host$user$pass)) {
          if (! 
        mysql_select_db($data)) {
           echo 
        '<P>This script has connected to the MySQL but could not connect to the Database';
           exit();
          }
         } else {
          echo 
        '<P>This script could not connect to the MySQL';
          exit();
         }
         
        #############################################
         
         
        $get_id $_GET['id'];
         
        $get_date $_GET['date'];
         
         
        $query "select * from mailopen where id = $get_id and date = $get_date";
         
        $result mysql_query($query);
         while (
        $getdata mysql_fetch_array($result)) {
          
        $open_count $getdata["open_count"];
         }
         
        mysql_free_result($result);
         
         if (! empty(
        $open_count)) {
          
        $query "insert into mailopen(id, date, open_count) values($get_id$get_date, 1)";
          
        $result mysql_query($query);
         } else {
          
        $open_count += 1;
          
        $query "update mailopen set open_count = $open_count where id = $get_id and date = $get_date";
          
        $result mysql_query($query);
         }
         
         
        $result mysql_query("optimize table mailopen"); 
        please help to pinpoint the problem i have with the script files. Thanks a million

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X