TYPO3 API  SVNRelease
SendmailTransport.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/SendmailTransport.php';
00012 //@require 'Swift/DependencyContainer.php';
00013 
00014 /**
00015  * SendmailTransport for sending mail through a sendmail/postfix (etc..) binary.
00016  * @package Swift
00017  * @subpackage Transport
00018  * @author Chris Corbyn
00019  */
00020 class Swift_SendmailTransport extends Swift_Transport_SendmailTransport
00021 {
00022 
00023   /**
00024    * Create a new SendmailTransport, optionally using $command for sending.
00025    * @param string $command
00026    */
00027   public function __construct($command = '/usr/sbin/sendmail -bs')
00028   {
00029     call_user_func_array(
00030       array($this, 'Swift_Transport_SendmailTransport::__construct'),
00031       Swift_DependencyContainer::getInstance()
00032         ->createDependenciesFor('transport.sendmail')
00033       );
00034 
00035     $this->setCommand($command);
00036   }
00037 
00038   /**
00039    * Create a new SendmailTransport instance.
00040    * @param string $command
00041    * @return Swift_SendmailTransport
00042    */
00043   public static function newInstance($command = '/usr/sbin/sendmail -bs')
00044   {
00045     return new self($command);
00046   }
00047 
00048 }