Hi, 

I am building a custom e-mailer for one of my websites using PHP and MySQL, I 
know there are loads out there already but my goal here is to learn this 
coding myself so I can modify it to my needs as and when they change. 

My list only has around 5000 subscribers at the moment and I have heard that 
with large lists like this it is ideal to batch send the emails. So my 
question is how do you batch code? 

This is the code I have in place at the moment.... 

$query=mysql_db_query($dbase,"SELECT * FROM Subscribers, Members where 
Subscribers.ListID='$ID' and Members.MID=Subscribers.MemberID");
$num_rows=mysql_num_rows($query);

for ($i=0; $i<$num_rows; $i++)
 {
  mysql_data_seek($query, $i);
  $array=mysql_fetch_array($query);
  $Email="$array[Email]";
  mail($Email, $MsgTitle, "$Message\n\n\n$Content", $Header);
 }


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to