[eluser]marcoss[/eluser]
[quote author="thepyromaniac" date="1182923434"]Server will time-out if there is a stupid-HUGE number of emails but its easy to avoid.
I normally have it output a bit of javascript code after every x number emails that will count down 5 seconds then continue on. I imagine the same could be done by using
Code:
class Page extends Controller()
function mass_email($startFrom = 0){
$counter = 1;
for($i=$startFrom; $i <= 1000 or whatever; $i++):
if($counter == 20) redirect('page/'.$i + 1, 'refresh');
$counter++;
endforeach;
}
}
Something simple like that.[/quote]
Yup, i use the same approach, not for email, but for database replication (long story) and it works just fine.