How about
<?
if (!(isset($post_count)))
{
$post_count=0;
}
$maillist=@file("maillist.txt");
// load mailing list
if ($maillist===false)
{
//ups error
}
else
{
for ($counter=$post_count;(($counter<count($maillist))&&($post_count<($post_count+100)));$counter++)
// the idea behind post count is that you don't send all mails at once since the script might be killed if it runs too long
{
mail($maillist[$counter],"FROM ME",$message);
// this mailing part can be more elaborate, like sending mime etc
}
}
// insert this code inside a form that posts to the same script and have it reload until its done
// with javascript this can be done automatically
echo "<input type=\"hidden\" name=\"post_count\" value=\"".$post_count."\">";
?>