this is my code for sending email to addresses from a DB unfortunately the email doesn't go out. do any of you know what's wrong with the code?
<?php
if($_GET['contact'] = "TRUE") {
$subject = $_POST['subject'];
$message = $_POST['message'];
$result = mysql_query("SELECT email, email2 FROM table WHERE username = 'Something' ") or exit(mysql_error());
while ($row = mysql_fetch_assoc($result)) {$list[] = $row['email'];}
$to = 'someone@free.net';
$headers .= 'to: someone@freet.net' . "\r\n";
$headers .= 'from: someone@freet.net' . "\r\n";
$headers .= 'bcc: ' . implode(',',$list) . "\r\n";
mail("$to", "$subject", "$message", "$headers");
}
?>