4 * This file is part of SwiftMailer.
5 * (c) 2004-2009 Chris Corbyn
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 //@require 'Swift/Transport/SendmailTransport.php';
12 //@require 'Swift/DependencyContainer.php';
15 * SendmailTransport for sending mail through a sendmail/postfix (etc..) binary.
17 * @subpackage Transport
18 * @author Chris Corbyn
20 class Swift_SendmailTransport
extends Swift_Transport_SendmailTransport
24 * Create a new SendmailTransport, optionally using $command for sending.
25 * @param string $command
27 public function __construct($command = '/usr/sbin/sendmail -bs')
30 array($this, 'Swift_Transport_SendmailTransport::__construct'),
31 Swift_DependencyContainer
::getInstance()
32 ->createDependenciesFor('transport.sendmail')
35 $this->setCommand($command);
39 * Create a new SendmailTransport instance.
40 * @param string $command
41 * @return Swift_SendmailTransport
43 public static function newInstance($command = '/usr/sbin/sendmail -bs')
45 return new self($command);