1: <?php
2:
3: /*
4: * This file is part of SwiftMailer.
5: * (c) 2004-2009 Chris Corbyn
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: * Sends Messages via an abstract Transport subsystem.
13: *
14: * @package Swift
15: * @subpackage Transport
16: * @author Chris Corbyn
17: */
18: interface Swift_Transport
19: {
20: /**
21: * Test if this Transport mechanism has started.
22: *
23: * @return boolean
24: */
25: public function isStarted();
26:
27: /**
28: * Start this Transport mechanism.
29: */
30: public function start();
31:
32: /**
33: * Stop this Transport mechanism.
34: */
35: public function stop();
36:
37: /**
38: * Send the given Message.
39: *
40: * Recipient/sender data will be retrieved from the Message API.
41: * The return value is the number of recipients who were accepted for delivery.
42: *
43: * @param Swift_Mime_Message $message
44: * @param string[] &$failedRecipients to collect failures by-reference
45: * @return int
46: */
47: public function send(Swift_Mime_Message $message, &$failedRecipients = null);
48:
49: /**
50: * Register a plugin in the Transport.
51: *
52: * @param Swift_Events_EventListener $plugin
53: */
54: public function registerPlugin(Swift_Events_EventListener $plugin);
55: }
56: