Hello guy i am using php mail function to deliver my mails if i run the code locally with 5 email id then it working fine without any error but if i run the same code with more than 400 email id then it show the warning messages link
Warning: mail() [function.mail]: Could not execute mail delivery program '/usr/sbin/sendmail -t -i' in /home/sendInvite.php on line 147
i am using this code :
$sqlquery1 = "select employee from empl where sstatus != 'C'";
$sqlmath1 = mysql_query($sqlquery1) or die("Error: (" . mysql_errno() . ") " . mysql_error());
$cnt = mysql_num_rows($sqlmath1);
if($cnt !="0") {
while($query1 = mysql_fetch_array($sqlmath1))
{
$email1=$query1['employee'];
$emid1=base64_encode($email1);
$sid1 =base64_encode($sidtest);
$email_from1 = "admin@gmail.com";
$link1="http://www.xx.php?mid=$emid1&sid=$sid1";
//send mail
$emailto_web1 = $email1;
$email_headers1 = "From: ".$email_from1;
num_sent_web1 = 0;
$email_message21 = "Dear Employee, \n";
$email_message21 .= "\n";
$email_message21 .= "If you cannot click on the URL, copy the URL and paste it on your address bar.\n";
$email_message21 .= "\n";
$email_message21 .= $link1."\n";
$email_message21 .= "\n\n\n";
$email_message21 .= "Regards,\n";
$email_message21 .= "Admin Team. \n";
$mail_web1 = mail($emailto_web1,$email_subject1,$email_message21,$email_headers1);
if($mail_web1)
{ $err = "Remainder Send Successfully";
}
else
{ $err=$email." Try Again";
}
}
} // not equal to zero condition
I dont know the exact reason why i receive this warning message, Please Post your valuble suggestion. Thanks in advance !!!