I have a mailing list.
everything seems to work, the email addresses are put into an array and it executes it also as many times as many email addresses it has ( I put print $email in it to see it, so I can check that this part works. however I never get an email........I tried it with many email addresses, so it' can't the reason, any ideas ? thanks
//Get the contents of the column Email from
//mailinglist table and put in an array.
$sql = "SELECT * FROM subscribers";
$result = mysql_query($sql);
//data from the message.php page
$subject = "$subject2";
$message = "$message";
//Send message loop
While ($row = mysql_fetch_array($result)) {
$email = $row['email_addr'];
$fromemail = "Xaaaa<aaa@aaa>";
$mailheaders = "From:" . trim($fromemail) . "\r\n";
$subject = "subject2";
$MailMsg =
"$message";
mail("$email <$email>",$subject, $MailMsg, $mailheaders);
print $email;
echo("Newsletter sent!<br>");
}