howto abort sending within batchSend
Posted: Fri Aug 01, 2008 6:56 am
I'm using the MySQLResult Iterator with batchSend to send out email notifications. I use the Decorator plugin to customize the message for each recipient, too. Everything works very well. FYI - v.3.3.3 on PHP5
What I want to do is check if the member is currently online before sending the message, and if he is, skip sending the email to him and continue on with the rest of the recipients. Even with keeping the number of recipients low, it is possible for a member to login in the middle of a batchSend.
My first thought was to create a BeforeSendListener plugin that would check the database and abort sending, but it doesn't look like that is possible. I could be wrong.
My current line of thought is to extend the MySQLResult Iterator class. Maybe the "hasNext" or "next" methods? Help!
I searched the docs and this forum, but didn't find an answer. I hope someone can point me in the right direction.
I'm new to Swift, but already love it.
Thanks
MTolman
ps - This is needed because my site's members often logout and then log back in a couple seconds later, to get to the top of the "Online" list.
What I want to do is check if the member is currently online before sending the message, and if he is, skip sending the email to him and continue on with the rest of the recipients. Even with keeping the number of recipients low, it is possible for a member to login in the middle of a batchSend.
My first thought was to create a BeforeSendListener plugin that would check the database and abort sending, but it doesn't look like that is possible. I could be wrong.
My current line of thought is to extend the MySQLResult Iterator class. Maybe the "hasNext" or "next" methods? Help!
I searched the docs and this forum, but didn't find an answer. I hope someone can point me in the right direction.
I'm new to Swift, but already love it.
Thanks
MTolman
ps - This is needed because my site's members often logout and then log back in a couple seconds later, to get to the top of the "Online" list.