I am sending email to some users and wants to know who had read it, means if some one had read that email then a log file will maintain which contain the email address of that user with date/time/IP. For this I send a javascript function with the email (html template) which just alert the email address of the user when ever a user opens that email like:
for($n=0; $n<sizeof($checkBox); $n++){
$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->Subject = $subject;
$function = "<script language='javascript'>function stats(emailId){alert(emailId);}</script>";
$bodyOpen = "<body onload='stats(".$checkBox[$n].");'>";
$msg_body .= $body .= "<table><tr><td>Hello Everyone</td></tr></table></body>";
$mail->Body = $function.$bodyOpen.$msg_body;
$mail->WordWrap = 50;
$mail->FromName = 'Muhammad Sajid';
$mail->IsMAIL();
$mail->From = 'webspot49@gmail.com';
$mail->AddAddress($checkBox[$n]);
$sent = $mail->Send();
}
html şablon çalışıyor ve sayfa yük üzerinde bir uyarı açılan gösteriyor ama ben bu html şablonu göndermek için kullanmak eğer işe yaramıyor.
And I only want to solve this issue using PHP5.x.x / javascript, no other software or third party tool. Any help..?