4 * This file is part of SwiftMailer.
5 * (c) 2004-2009 Chris Corbyn
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 //@require 'Swift/Mime/Message.php';
12 //@require 'Swift/Events/EventListener.php';
15 * Sends Messages via an abstract Transport subsystem.
18 * @subpackage Transport
19 * @author Chris Corbyn
21 interface Swift_Transport
25 * Test if this Transport mechanism has started.
29 public function isStarted();
32 * Start this Transport mechanism.
34 public function start();
37 * Stop this Transport mechanism.
39 public function stop();
42 * Send the given Message.
44 * Recipient/sender data will be retreived from the Message API.
45 * The return value is the number of recipients who were accepted for delivery.
47 * @param Swift_Mime_Message $message
48 * @param string[] &$failedRecipients to collect failures by-reference
51 public function send(Swift_Mime_Message
$message, &$failedRecipients = null);
54 * Register a plugin in the Transport.
56 * @param Swift_Events_EventListener $plugin
58 public function registerPlugin(Swift_Events_EventListener
$plugin);