equal
deleted
inserted
replaced
|
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 * SendmailTransport for sending mail through a sendmail/postfix (etc..) binary. |
|
14 * @package Swift |
|
15 * @subpackage Transport |
|
16 * @author Chris Corbyn |
|
17 */ |
|
18 class Swift_SendmailTransport extends Swift_Transport_SendmailTransport |
|
19 { |
|
20 |
|
21 /** |
|
22 * Create a new SendmailTransport, optionally using $command for sending. |
|
23 * @param string $command |
|
24 */ |
|
25 public function __construct($command = '/usr/sbin/sendmail -bs') |
|
26 { |
|
27 call_user_func_array( |
|
28 array($this, 'Swift_Transport_SendmailTransport::__construct'), |
|
29 Swift_DependencyContainer::getInstance() |
|
30 ->createDependenciesFor('transport.sendmail') |
|
31 ); |
|
32 |
|
33 $this->setCommand($command); |
|
34 } |
|
35 |
|
36 /** |
|
37 * Create a new SendmailTransport instance. |
|
38 * @param string $command |
|
39 * @return Swift_SendmailTransport |
|
40 */ |
|
41 public static function newInstance($command = '/usr/sbin/sendmail -bs') |
|
42 { |
|
43 return new self($command); |
|
44 } |
|
45 |
|
46 } |