Hi all,
any one tell me if there is something wrong in this code. i have no error, everything in completing, but no e-mail sent..
<?php
$emailfrom='
[email protected]';
if($list){
Header("Location:list.php");
exit;
}
if(!$file=fopen("newsletter.dat", "r")){
echo "Could not open the data file";
}else{
$linesarr=file("newsletter.dat");
for($i=0; $i<count($linesarr);$i++){
$tmparr=explode("\n",$linesarr[$i]);
$linesarr[$i]=$tmparr[0];
$mail_body="Hello $linesarr[$i],
$msg
Thank You,
BIN HANI ESTABLISHMENT
";
mail($linesarr[$i], 'Bin Hani Est.', $mail_body,"Content-Type:text/html; charset=windows-1256\r\nFrom: $emailfrom\r\nReply-to: $emailfrom");
}
echo "</body></html>";
echo "<html><head><META HTTP-EQUIV=Refresh CONTENT=\"1; URL=sendsuccess.php\">";
echo "</head><body background=\"images/bgyello.jpg\" bgcolor=#FFFFFF>";
echo "<table align=center border=0 cellpadding=0 cellspacing=0><tr><td></td></tr></table></body></html>";
}
?>
this file in the action of a form, and the newsletter.dat file exist and contain e-mail addresses.
please help as soon as possible.