Mass Email?
Posted: Mon Dec 08, 2003 5:43 pm
Hi guys!
I have a subscriber list and use software that cost me $100s of dollars and takes quite a while(Maybe an hour) to send out just 1,000 emails!
Does anyone know of any code that will allow me to send out something like 30,000 emails per hour?
I have this code but I don't think it works...:
Will that work?
Thanks
Ben
I have a subscriber list and use software that cost me $100s of dollars and takes quite a while(Maybe an hour) to send out just 1,000 emails!
Does anyone know of any code that will allow me to send out something like 30,000 emails per hour?
I have this code but I don't think it works...:
Code: Select all
<?php
function send_mail($to,$subject,$mail_body)
{
global $youremail
$Scharset = "iso-8859-1";
$subject = stripslashes($subject);
$mailbody = stripslashes($mail_body) . "\n\n";
$mailheaders .= "Content-Type: text/plain; charset=$Scharset\n";
$mailheaders .= "From: $youremail<$youremail>\n";
$mailheaders .= "Reply-To: $youremail\n";
$mailheaders .= "X-Mailer: $youremail";
@mail($to,$subject,$mailbody,$mailheaders);
}
$sendemail = "select * from "maillist";
$showresult = mysql_query($sendemail) or die("<b>MySQL Error:</b> " . mysql_error());
$numrows = mysql_num_rows($showresult);
if ($numrows==0) print "No email addresses found!";
for ($i=0; $i<100; $i++) {
echo (" "); flush();
}
for($x=0;$x<$numrows;$x++) {
unset($name, $email);
$row = mysql_fetch_array($showresult);
send_mail($row[email],$subject,$message);
flush();
usleep(5000);
}
?>Thanks
Ben