as it states in the PHP manual the mail() function isn't suitable for looping and sending heaps of mail and isn't resource effective:

[a href=\"http://se.php.net/manual/en/function.mail.php\" target=\"_blank\"]http://se.php.net/manual/en/function.mail.php[/a][!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Note: It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient.[/quote]

so you might want to read up on sending mail with [a href=\"http://pear.php.net/package/Mail\" target=\"_blank\"]PEAR[/a] which would be more suitable for this.