PageRenderTime 30ms CodeModel.GetById 27ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/swift/lib/classes/Swift/SendmailTransport.php

http://zoop.googlecode.com/
PHP | 48 lines | 17 code | 7 blank | 24 comment | 0 complexity | e0aab6ad6862061a474f21e622f98f85 MD5 | raw file
 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//@require 'Swift/Transport/SendmailTransport.php';
12//@require 'Swift/DependencyContainer.php';
13
14/**
15 * SendmailTransport for sending mail through a sendmail/postfix (etc..) binary.
16 * @package Swift
17 * @subpackage Transport
18 * @author Chris Corbyn
19 */
20class Swift_SendmailTransport extends Swift_Transport_SendmailTransport
21{
22  
23  /**
24   * Create a new SendmailTransport, optionally using $command for sending.
25   * @param string $command
26   */
27  public function __construct($command = '/usr/sbin/sendmail -bs')
28  {
29    call_user_func_array(
30      array($this, 'Swift_Transport_SendmailTransport::__construct'),
31      Swift_DependencyContainer::getInstance()
32        ->createDependenciesFor('transport.sendmail')
33      );
34    
35    $this->setCommand($command);
36  }
37  
38  /**
39   * Create a new SendmailTransport instance.
40   * @param string $command
41   * @return Swift_SendmailTransport
42   */
43  public static function newInstance($command = '/usr/sbin/sendmail -bs')
44  {
45    return new self($command);
46  }
47  
48}