PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
It is currently Thu Feb 21, 2019 9:16 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Jul 15, 2009 5:23 am 
Forum Newbie

Joined: Wed Jul 15, 2009 5:10 am
Posts: 1
I'm going to be using swiftmailer to handle the dispatch of email campaigns and newsletters which could potentially be sent to large mailinglists (up to 17000 recipients)

When the message is sent, an ajax callback (jquery incase it interests you) is made posting all relevant variables to the php file which will batch send the message. When the callback is made a 'loading animation' fades in, then 'onSuccess' the script returns the relevant success or failure message to the page and the loading animation fades out.
Syntax: [ Download ] [ Hide ]
$('#LogLoad').fadeIn();$('html, body').animate({scrollTop:0},1000);
$('#LogResult').html(data);},error:function(){alert('An error occured - please try again!');,

As the process could take some time to complete I'd like to be able to see a live sending status and I'm just trying to get my head round the best way to achieve this. I thought I'd see if anyone here has done this before or has any suggestions.

Ideally when the process is occuring I'd like to see a status such as 'sending to 4 of 685' which updates in realtime or refreshes every few seconds to show the latest 'sending to 17 of 685' status.

PostPosted: Thu Jul 30, 2009 12:14 pm 
Forum Newbie

Joined: Wed Apr 16, 2008 2:19 am
Posts: 8
if all you need to do is get the running count, your best bet is to have the script update some txt file containing the count, and have the ajax call query the file or the controller that reads that file.

we update a database and get the counts from that via ajax calls to a status controller. this allows us to track specifically which recipients failed, not just the count.

there is no way to store it in session, because it does not get written out to disk till the script stops running.


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 5 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group