Avail feature updated
[ninja.git] / application / vendor / swiftmailer / classes / Swift / SmtpTransport.php
blob65180d5870f415bd04c3b5f38a51bca57918accd
1 <?php
3 /*
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.
9 */
11 //@require 'Swift/Transport/EsmtpTransport.php';
12 //@require 'Swift/DependencyContainer.php';
14 /**
15 * Sends Messages over SMTP with ESMTP support.
16 * @package Swift
17 * @subpackage Transport
18 * @author Chris Corbyn
20 class Swift_SmtpTransport extends Swift_Transport_EsmtpTransport
23 /**
24 * Create a new SmtpTransport, optionally with $host, $port and $security.
25 * @param string $host
26 * @param int $port
27 * @param int $security
29 public function __construct($host = 'localhost', $port = 25,
30 $security = null)
32 call_user_func_array(
33 array($this, 'Swift_Transport_EsmtpTransport::__construct'),
34 Swift_DependencyContainer::getInstance()
35 ->createDependenciesFor('transport.smtp')
38 $this->setHost($host);
39 $this->setPort($port);
40 $this->setEncryption($security);
43 /**
44 * Create a new SmtpTransport instance.
45 * @param string $host
46 * @param int $port
47 * @param int $security
48 * @return Swift_SmtpTransport
50 public static function newInstance($host = 'localhost', $port = 25,
51 $security = null)
53 return new self($host, $port, $security);