Hi,
so I have 15 recipients, Anti-flood is setup to send the message to 5 recipients and stop for 2 seconds for testing basically.
Though when sending the first batch, the first 5 recipients, the script ends.
I have set_time_limit(0); ignore_user_abort(); before sending but I don't think it's that, because when I deactivate the plugin, it sends to the 15 recipients.
Any thoughts on what might cause that ?
Anti-Flood stopping after sending the first batch
Moderators: Chris Corbyn, General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Ok,
Though I'm using cakePHP and I use the swiftMailer component I wrote for it, anyway the component is here:
http://bin.cakephp.org/view/1053105011
I haven't tested fully to release it to the public 'cause the old one wasn't compatible.
and here is the send action
http://bin.cakephp.org/view/789992772
I can confirm that the values passed to setPause are 5 emails and 2 seconds
It's Cake code basically
Though I'm using cakePHP and I use the swiftMailer component I wrote for it, anyway the component is here:
http://bin.cakephp.org/view/1053105011
I haven't tested fully to release it to the public 'cause the old one wasn't compatible.
and here is the send action
http://bin.cakephp.org/view/789992772
I can confirm that the values passed to setPause are 5 emails and 2 seconds
It's Cake code basically
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Hi, never actually registered that it was you making the post 
I see you upgraded to v3
I'm not sure if I'm reading the code right (I had a long night out last night!) but is close() being called after every successful send? This could be counter-intuitive since AntiFlood would be governing when connections are closed if it's loaded. How are you dealing with the 15 recipients? Looping or passing an array?
PS: You may want to consider dropping the EasySwift usage (deprecated pretty quickly since everyone seems to just want the new API). I'd be happy to help rework your component to do this. It'll probably make things more flexible for you too, being broken into smaller units with specific jobs.
I see you upgraded to v3
PS: You may want to consider dropping the EasySwift usage (deprecated pretty quickly since everyone seems to just want the new API). I'd be happy to help rework your component to do this. It'll probably make things more flexible for you too, being broken into smaller units with specific jobs.
Hey 
yea I upgraded to v3, the first step was to get it working that's why I used EasySwift, then as I wrote in the header of the file ( comments ) todo is to get ride of EasySwift
Help would be very appreciated, bear in mind though, Cake unlike other frameworks supports php 4 and 5 ( like Swift actually
) and I don't want to break this rule. We can collaborate by email if you wish, or MSN ?
yes I'm calling $this->mailer->close(); after send() oh I shouldn't ?
doesn't Antiflood reconnect anyway ? when should I call close then ? AntiFlood does it when it finishes ?
Regards.
yea I upgraded to v3, the first step was to get it working that's why I used EasySwift, then as I wrote in the header of the file ( comments ) todo is to get ride of EasySwift
Help would be very appreciated, bear in mind though, Cake unlike other frameworks supports php 4 and 5 ( like Swift actually
yes I'm calling $this->mailer->close(); after send() oh I shouldn't ?
doesn't Antiflood reconnect anyway ? when should I call close then ? AntiFlood does it when it finishes ?
I'd say passing an array, it's in the second paste, I call add which adds to an internal array, and that array is passed to EasySwift::sendHow are you dealing with the 15 recipients? Looping or passing an array?
Regards.