What wrong with this code? It does'nt consistently send email with the
users in that table. Sometimes it duplicate sending to a certain users and
sometimes it doesnt.
Please help
$query=("Select * from $users_tablename where Group_Id='3' ");
$result = mysql_query($query);
if(!$result)error_message(sql_error());
while($query_data=mysql_fetch_array($result)){
$E_mail=$query_data[E_mail];
$Title=$query_data[Title];
$Nickname=$query_data[Nickname];
$mail_body = "Sir $Nickname, \n \n";
$subject="For Approval 8D no. $Dno";
if(mail($E_mai, $subject, $mail_body)){
print("Message Sent");
}else{
error_message("Failed to Notify Mr. $Title! Contact your Systems
Administrator immediately! ");
}
Regards,
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php