TYPO3 API  SVNRelease
MailTransport.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/Transport/MailTransport.php';
00012 //@require 'Swift/DependencyContainer.php';
00013 
00014 /**
00015  * Sends Messages using the mail() function.
00016  * @package Swift
00017  * @subpackage Transport
00018  * @author Chris Corbyn
00019  */
00020 class Swift_MailTransport extends Swift_Transport_MailTransport
00021 {
00022 
00023   /**
00024    * Create a new MailTransport, optionally specifying $extraParams.
00025    * @param string $extraParams
00026    */
00027   public function __construct($extraParams = '-f%s')
00028   {
00029     call_user_func_array(
00030       array($this, 'Swift_Transport_MailTransport::__construct'),
00031       Swift_DependencyContainer::getInstance()
00032         ->createDependenciesFor('transport.mail')
00033       );
00034 
00035     $this->setExtraParams($extraParams);
00036   }
00037 
00038   /**
00039    * Create a new MailTransport instance.
00040    * @param string $extraParams To be passed to mail()
00041    * @return Swift_MailTransport
00042    */
00043   public static function newInstance($extraParams = '-f%s')
00044   {
00045     return new self($extraParams);
00046   }
00047 
00048 }