TYPO3 API  SVNRelease
Transport.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  * This file is part of SwiftMailer.
00005  * (c) 2004-2009 Chris Corbyn
00006  *
00007  * For the full copyright and license information, please view the LICENSE
00008  * file that was distributed with this source code.
00009  */
00010 
00011 //@require 'Swift/Mime/Message.php';
00012 //@require 'Swift/Events/EventListener.php';
00013 
00014 /**
00015  * Sends Messages via an abstract Transport subsystem.
00016  *
00017  * @package Swift
00018  * @subpackage Transport
00019  * @author Chris Corbyn
00020  */
00021 interface Swift_Transport
00022 {
00023 
00024   /**
00025    * Test if this Transport mechanism has started.
00026    *
00027    * @return boolean
00028    */
00029   public function isStarted();
00030 
00031   /**
00032    * Start this Transport mechanism.
00033    */
00034   public function start();
00035 
00036   /**
00037    * Stop this Transport mechanism.
00038    */
00039   public function stop();
00040 
00041   /**
00042    * Send the given Message.
00043    *
00044    * Recipient/sender data will be retreived from the Message API.
00045    * The return value is the number of recipients who were accepted for delivery.
00046    *
00047    * @param Swift_Mime_Message $message
00048    * @param string[] &$failedRecipients to collect failures by-reference
00049    * @return int
00050    */
00051   public function send(Swift_Mime_Message $message, &$failedRecipients = null);
00052 
00053   /**
00054    * Register a plugin in the Transport.
00055    *
00056    * @param Swift_Events_EventListener $plugin
00057    */
00058   public function registerPlugin(Swift_Events_EventListener $plugin);
00059 
00060 }