so here's the code
if(isset($_POST['Subject']))
{ $selectdb = mysql_select_db("chad1_mDB",$dbh);
$query = mysql_query("SELECT * FROM gtmEmail");
// Creates an array of items with keys corresponding to table columns...
$i=0;
while($row = mysql_fetch_array($query)){
//Send the email
$emailsArray[] = $row[email];
$i++;
}
while($i>0)
{ $i--;
echo $emailsArray[$i].", ";
}
$emailsString = implode(", ", $emailsArray);;
$to = "chad@chadcoronato.com";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "Bcc: ".$emailsString."\r\n";
$headers .= "From: ground2machine@yahoo.com\r\n";
$mail = @mail($to,$_POST['Subject'],$_POST['Body'],$headers);
if(!$mail){
echo "Email not sent! Please try later...";
}else{
echo "Mail sent successfully!";
}
}
any reason why it might not be working? it gives me the "Mail sent succesfully!" message after I send it.. but I never get the emails?
Thanks much