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/EsmtpTransport.php';
12 //@require 'Swift/DependencyContainer.php';
15 * Sends Messages over SMTP with ESMTP support.
17 * @subpackage Transport
18 * @author Chris Corbyn
20 class Swift_SmtpTransport
extends Swift_Transport_EsmtpTransport
24 * Create a new SmtpTransport, optionally with $host, $port and $security.
27 * @param int $security
29 public function __construct($host = 'localhost', $port = 25,
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);
44 * Create a new SmtpTransport instance.
47 * @param int $security
48 * @return Swift_SmtpTransport
50 public static function newInstance($host = 'localhost', $port = 25,
53 return new self($host, $port, $security);