Dear All
I'm retrieving all the emails from xyz database, n sending it out. But the problem is tht to whomsoever gets the email, gets a list of all the emails sent to others.
for eg a person recieving an email will get like this:
Dear XYZ
How are you?
Dear ZYX
How are you?
& so on till all the emails from the database
It is not going individually
Wat cud the problem be in the below code?
while( $srow = mysql_fetch_array( $sresult ) )
{
$fn = $srow['FULLNAME'];
$id = $srow['ID_NO'];
$Fromname = "School";
$Fromaddress = "school@desgins.com";
$body = $body.''."Dear $fn ($id)\n\n" .$comm;
if ($srow['EMAIL'] != "")
{
$cnt = $cnt + 1;
$sendto = $srow['EMAIL'];
mail($sendto, $subject, $body, "From: ".$Fromname." <".$Fromaddress.">");
}
}