I have the following code. And an email is sent to all recipients, but there is no body in the mails being sent in mass, only in the second part of this script where an email will be sent to only one email address, then the body shows up.. Why???
mysql_select_db($database_gspot, $gspot);
$query_FanClub = "SELECT `Email Address` FROM test ORDER BY `Email Address` ASC";
$FanClub = mysql_query($query_FanClub, $gspot) or die(mysql_error());
$row_FanClub = mysql_fetch_assoc($FanClub);
$totalRows_FanClub = mysql_num_rows($FanClub);
if ((isset($HTTP_POST_VARS['Submit'])) && ($email =='')){
while ($row_1 = mysql_fetch_array($FanClub)){
mail($row_1['Email Address'], "$title","$Body",
"From: [email]test@test.com[/email]\r\n".
"Reply-To: [email]test@test.com[/email]\r\n".
"Return-Path: [email]test@test.com[/email]\r\n");
echo $row_1['Email Address'];
}
} else if ($email!=''){
mail($email, "$title","$body",
"From: [email]test@test.com[/email]\r\n".
"Reply-To: [email]test@test.com[/email]\r\n".
"Return-Path: [email]test@test.com[/email]\r\n");
}