Removed dep on API
[ninja.git] / application / vendor / swiftmailer / classes / Swift / Transport.php
blob9b54752fbade6e42d46b1f14fac2a1a794c39b81
1 <?php
3 /*
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.
9 */
11 //@require 'Swift/Mime/Message.php';
12 //@require 'Swift/Events/EventListener.php';
14 /**
15 * Sends Messages via an abstract Transport subsystem.
17 * @package Swift
18 * @subpackage Transport
19 * @author Chris Corbyn
21 interface Swift_Transport
24 /**
25 * Test if this Transport mechanism has started.
27 * @return boolean
29 public function isStarted();
31 /**
32 * Start this Transport mechanism.
34 public function start();
36 /**
37 * Stop this Transport mechanism.
39 public function stop();
41 /**
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
49 * @return int
51 public function send(Swift_Mime_Message $message, &$failedRecipients = null);
53 /**
54 * Register a plugin in the Transport.
56 * @param Swift_Events_EventListener $plugin
58 public function registerPlugin(Swift_Events_EventListener $plugin);