Base class for Spools (implements time and message limits).

package Swift
author Fabien Potencier

 Methods

Sends messages using the given transport instance.

flushQueue(\Swift_Transport $transport, string[] $failedRecipients) : int
Inherited
inherited_from \Swift_Spool::flushQueue()

Parameters

$transport

\Swift_Transport

A transport instance

$failedRecipients

string[]

&$failedRecipients An array of failures by-reference

Returns

intThe number of sent emails

Gets the maximum number of messages to send per flush.

getMessageLimit() : int

Returns

intThe limit

Gets the time limit (in seconds) per flush.

getTimeLimit() : int

Returns

intThe limit

Tests if this Spool mechanism has started.

isStarted() : boolean
Inherited
inherited_from \Swift_Spool::isStarted()

Returns

boolean

Queues a message.

queueMessage(\Swift_Mime_Message $message) : boolean
Inherited
inherited_from \Swift_Spool::queueMessage()

Parameters

$message

\Swift_Mime_Message

The message to store

Returns

booleanWhether the operation has succeeded

Sets the maximum number of messages to send per flush.

setMessageLimit(int $limit) 

Parameters

$limit

int

The limit

Sets the time limit (in seconds) per flush.

setTimeLimit(int $limit) 

Parameters

$limit

int

The limit

Starts this Spool mechanism.

start() 
Inherited
inherited_from \Swift_Spool::start()

Stops this Spool mechanism.

stop() 
Inherited
inherited_from \Swift_Spool::stop()

 Properties

 

$_message_limit 
 

$_time_limit