Hi, I've been looking at the manual and am Still having problems with my code. Currently the person in the $to get an email but nobody in the BCC get's an email. Can anyone help?
/ EMAIL TO ALL EVERYONE /
$result = mysql_query("SELECT DISTINCT(Email) FROM Distributor");
if (!$result) { echo("<P>Error performing query: ' . mysql_error() . '</P>"); exit();}
while ($row = mysql_fetch_array($result)) {
$Email = $row["Email"];
$display_block .=" $Email, ";
}
$sql = mysql_query("SELECT DISTINCT(Email) FROM Subscriber");
if (!$sql) { echo("<P>Error performing query: ' . mysql_error() . '</P>"); exit();}
while ($row = mysql_fetch_array($sql)) {
$subEmail = $row["Email"];
$display_block .="
$subEmail, ";
}
$headers = "From: $fromname <$fromaddress>\n";
$headers.= "Reply-To: $fromaddress\n";
$headers.= "BCC: $display_block";
$to = "steve@supracore.com";
mail($to, $Subject, $words, $headers);
echo ("You mailing has been sent to: $display_block .");
mysql_close();
Thanks,
Steve