Reduces network flooding when sending large amounts of mail.

package Swift
subpackage Plugins
author Chris Corbyn

 Methods

Create a new AntiFloodPlugin with $threshold and $sleep time.

__construct(int $threshold, int $sleep, \Swift_Plugins_Sleeper $sleeper) 

Parameters

$threshold

int

$sleep

int

time

$sleeper

\Swift_Plugins_Sleeper

(not needed really)

Invoked immediately before the Message is sent.

beforeSendPerformed(\Swift_Events_SendEvent $evt) 

Parameters

Get the number of seconds to sleep for during a restart.

getSleepTime() : int

Returns

int

Get the number of emails to send before restarting.

getThreshold() : int

Returns

int

Invoked immediately after the Message is sent.

sendPerformed(\Swift_Events_SendEvent $evt) 

Parameters

Set the number of seconds to sleep for during a restart.

setSleepTime(int $sleep) 

Parameters

$sleep

int

time

Set the number of emails to send before restarting.

setThreshold(int $threshold) 

Parameters

$threshold

int

Sleep for $seconds.

sleep(int $seconds) 

Parameters

$seconds

int

 Properties

 

$_counter : int
access private
 

$_sleep : int
access private
 

$_sleeper : \Swift_Plugins_Sleeper
access private
 

$_threshold : int
access private