Class Swift_FileSpool
Inheritance | Swift_FileSpool » Swift_ConfigurableSpool |
---|---|
Implements | Swift_Spool |
Stores Messages on the filesystem.
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Create a new FileSpool. | Swift_FileSpool |
flushQueue() | Sends messages using the given transport instance. | Swift_FileSpool |
getMessageLimit() | Gets the maximum number of messages to send per flush. | Swift_ConfigurableSpool |
getTimeLimit() | Gets the time limit (in seconds) per flush. | Swift_ConfigurableSpool |
isStarted() | Tests if this Spool mechanism has started. | Swift_FileSpool |
queueMessage() | Queues a message. | Swift_FileSpool |
recover() | Execute a recovery if for any reason a process is sending for too long. | Swift_FileSpool |
setMessageLimit() | Sets the maximum number of messages to send per flush. | Swift_ConfigurableSpool |
setRetryLimit() | Allow to manage the enqueuing retry limit. | Swift_FileSpool |
setTimeLimit() | Sets the time limit (in seconds) per flush. | Swift_ConfigurableSpool |
start() | Starts this Spool mechanism. | Swift_FileSpool |
stop() | Stops this Spool mechanism. | Swift_FileSpool |
Protected Methods
Method | Description | Defined By |
---|---|---|
getRandomString() | Returns a random string needed to generate a fileName for the queue. | Swift_FileSpool |
Method Details
Create a new FileSpool.
public void __construct ( $path ) | ||
$path | string | |
throws | Swift_IoException |
---|
Sends messages using the given transport instance.
public int flushQueue ( Swift_Transport $transport, <b>&</b>$failedRecipients = null ) | ||
$transport | Swift_Transport | A transport instance |
$failedRecipients | string[] | An array of failures by-reference |
return | int | The number of sent e-mail's |
---|
Returns a random string needed to generate a fileName for the queue.
protected string getRandomString ( $count ) | ||
$count | int |
Tests if this Spool mechanism has started.
public bool isStarted ( ) |
Queues a message.
public bool queueMessage ( Swift_Mime_Message $message ) | ||
$message | Swift_Mime_Message | The message to store |
throws | Swift_IoException |
---|
Execute a recovery if for any reason a process is sending for too long.
public void recover ( $timeout = 900 ) | ||
$timeout | int | In second Defaults is for very slow smtp responses |
Allow to manage the enqueuing retry limit.
Default, is ten and allows over 64^20 different fileNames
public void setRetryLimit ( $limit ) | ||
$limit | int |
Starts this Spool mechanism.
public void start ( ) |
Stops this Spool mechanism.
public void stop ( ) |