throttler and anti-flood

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
jimlongo
Forum Newbie
Posts: 2
Joined: Mon May 28, 2007 12:14 am

throttler and anti-flood

Post by jimlongo »

Hi,
My ISP has a 500 per hour policy with a burst rate of 20 per minute.

Can I use either of these plug-ins or some combination to send 20 per minute with a cap of 500 hour?

At the moment the application using your module has

Code: Select all

//Reconnect after 20 emails 
      // sends 20 emails, closes connection, wait 60 seconds and continue sending emails. 
      $swift->attachPlugin(new Swift_Plugin_AntiFlood(20, 60), "anti-flood");
to send 20 per minute.


TIA,
jim
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

If you try loading the throttler twice, whichever has the slowest rate will take control o the burst rate will become irrelevant. You can do the 500/hour fine though :)
jimlongo
Forum Newbie
Posts: 2
Joined: Mon May 28, 2007 12:14 am

Post by jimlongo »

So it would do 20 a minute for 25 minutes and then wait for the hour?



A few more questions if you don't mind.

Is the throttler a better choice than using the Anti-Flood plug-in?

Do you think 20 a minute is in any way a better choice than 1 every 3 seconds?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

jimlongo wrote:So it would do 20 a minute for 25 minutes and then wait for the hour?



A few more questions if you don't mind.

Is the throttler a better choice than using the Anti-Flood plug-in?

Do you think 20 a minute is in any way a better choice than 1 every 3 seconds?
To do that I'd set it up:

Load Throttler, rate limited to 20/minute.
Load AntiFlood with an email limit of 500 and a wait-time of 35 minutes.

If my maths is right that should do what you need.

I'd be tempted to load another instance of AntiFlood with a capacity of 50 or so, but no waiting time too.
Post Reply