Thanks kburger.
i tried to use phpmailer to solve this issue. when i am using mail() function of phpmailer it fail to send more than 5 at a time. so i tried sendmail() function of phpmailer . when executing it is telling that all mails are send. but only five is reaching in mailbox.
the code given below
<?
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSendmail(); // send mail;
$mail->From = "from@from.com";
$mail->FromName= "From Name";
$email="toid@todom.com";
$mail->AddAddress($email);
for($i=0;$i<3;$i++)
{
$mail->Subject = "sendmail : example";
$mail->Body = "hi ! \n\n this is First mailing I made myself from sendmail ";
$mail->WordWrap = 50;
if(!$mail->Send())
{
echo "<br>Message was not sent";
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo " Message has been sent to :$email <br/>";
}
}
$mail->ClearAddresses();
$email="toid@todom.com";
$mail->AddAddress($email);
$mail->Priority=1;
for($i=0;$i<5;$i++)
{
$mail->Subject = "sendmail : example";
$mail->Body = "hi ! \n\n this is First mailing I made myself from sendmail ";
$mail->WordWrap = 50;
if(!$mail->Send())
{
echo "<br>Message was not sent";
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo " Message has been sent to :$email <br/>";
}
}
?>