Welcome Guest, Not a member yet? Register   Sign In
Emailing in batch
#1

[eluser]stef25[/eluser]
Is there any way to find out if a batch emailing has been completed? My app will email 100's of people say in batches of 50. For each email sent out there is an accompanying INSERT statement to the DB. If some batches don't get sent out then those INSERTs should not happen or be deleted.

Is there any way I can check this, apart from the return value of $this->email->send() ?
#2

[eluser]JHackamack[/eluser]
Why not use http://ellislab.com/codeigniter/user-gui...tions.html around your email loop. You can put some more logic in the loop if the email doesn't send correctly.
#3

[eluser]stef25[/eluser]
Yes I thought of using transactions. About emailing in a loop: if 5000 emails need to get sent out, will this work? I don't know how much memory this would take up, if it will be a stable process etc.

Anyone have any experience with this?
#4

[eluser]JHackamack[/eluser]
I've been able to send 4,000 emails easily in CI without having a significant memory impact.
#5

[eluser]InsiteFX[/eluser]
if ( ! $this->email->send())
do an error
else
insert data

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB