|
0
|
1 |
<?php |
|
|
2 |
|
|
|
3 |
/* |
|
|
4 |
* This file is part of SwiftMailer. |
|
|
5 |
* (c) 2009 Fabien Potencier <fabien.potencier@gmail.com> |
|
|
6 |
* |
|
|
7 |
* For the full copyright and license information, please view the LICENSE |
|
|
8 |
* file that was distributed with this source code. |
|
|
9 |
*/ |
|
|
10 |
|
|
|
11 |
/** |
|
|
12 |
* Interface for spools. |
|
|
13 |
* @package Swift |
|
|
14 |
* @author Fabien Potencier |
|
|
15 |
*/ |
|
|
16 |
interface Swift_Spool |
|
|
17 |
{ |
|
|
18 |
/** |
|
|
19 |
* Starts this Spool mechanism. |
|
|
20 |
*/ |
|
|
21 |
public function start(); |
|
|
22 |
|
|
|
23 |
/** |
|
|
24 |
* Stops this Spool mechanism. |
|
|
25 |
*/ |
|
|
26 |
public function stop(); |
|
|
27 |
|
|
|
28 |
/** |
|
|
29 |
* Tests if this Spool mechanism has started. |
|
|
30 |
* |
|
|
31 |
* @return boolean |
|
|
32 |
*/ |
|
|
33 |
public function isStarted(); |
|
|
34 |
|
|
|
35 |
/** |
|
|
36 |
* Queues a message. |
|
|
37 |
* @param Swift_Mime_Message $message The message to store |
|
|
38 |
*/ |
|
|
39 |
public function queueMessage(Swift_Mime_Message $message); |
|
|
40 |
|
|
|
41 |
/** |
|
|
42 |
* Sends messages using the given transport instance. |
|
|
43 |
* |
|
|
44 |
* @param Swift_Transport $transport A transport instance |
|
|
45 |
* @param string[] &$failedRecipients An array of failures by-reference |
|
|
46 |
* |
|
|
47 |
* @return int The number of sent emails |
|
|
48 |
*/ |
|
|
49 |
public function flushQueue(Swift_Transport $transport, &$failedRecipients = null); |
|
|
50 |
} |