vendor/swiftmailer/lib/classes/Swift/MailTransport.php
changeset 0 7f95f8617b0b
equal deleted inserted replaced
-1:000000000000 0:7f95f8617b0b
       
     1 <?php
       
     2 
       
     3 /*
       
     4  * This file is part of SwiftMailer.
       
     5  * (c) 2004-2009 Chris Corbyn
       
     6  *
       
     7  * For the full copyright and license information, please view the LICENSE
       
     8  * file that was distributed with this source code.
       
     9  */
       
    10 
       
    11 
       
    12 /**
       
    13  * Sends Messages using the mail() function.
       
    14  * @package Swift
       
    15  * @subpackage Transport
       
    16  * @author Chris Corbyn
       
    17  */
       
    18 class Swift_MailTransport extends Swift_Transport_MailTransport
       
    19 {
       
    20   
       
    21   /**
       
    22    * Create a new MailTransport, optionally specifying $extraParams.
       
    23    * @param string $extraParams
       
    24    */
       
    25   public function __construct($extraParams = '-f%s')
       
    26   {
       
    27     call_user_func_array(
       
    28       array($this, 'Swift_Transport_MailTransport::__construct'),
       
    29       Swift_DependencyContainer::getInstance()
       
    30         ->createDependenciesFor('transport.mail')
       
    31       );
       
    32     
       
    33     $this->setExtraParams($extraParams);
       
    34   }
       
    35   
       
    36   /**
       
    37    * Create a new MailTransport instance.
       
    38    * @param string $extraParams To be passed to mail()
       
    39    * @return Swift_MailTransport
       
    40    */
       
    41   public static function newInstance($extraParams = '-f%s')
       
    42   {
       
    43     return new self($extraParams);
       
    44   }
       
    45   
       
    46 }