I deposited 230 or so emails to my database and when i went to send to them all, only 30 or so showed up as successfully sent.
Here is the coding if it helps...
Code: Select all
<?
// set up a message
$subject = "hi";
$msg = "blah blah";
$headers = "From: Joe\nReply-To: joe@blow.org";
// connect to the database and collect addresses
$db = @mysql_connect("", "", "");
@mysql_select_db("newsletter", $db);
$sql = "select emails from emails";
$res = @mysql_query($sql) or die("Couldn't get addresses.");
// loop through the result set and send mail
while ($email_row = @mysql_fetch_array($res)) {
// get the recipient address
$to = $email_rowї'emails'];
//send the mail
mail("$to", "$subject", "$msg", "$headers");
//print a confirmation to the screen
echo "mail sent to $to <br>";
}
?>