[ Index ]

MailPress 544

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/Swiftmailer/classes/Swift/ -> SmtpTransport.php (source)

   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   * Sends Messages over SMTP with ESMTP support.
  13   *
  14   * @author Chris Corbyn
  15   *
  16   * @method Swift_SmtpTransport setUsername(string $username) Set the username to authenticate with.
  17   * @method string              getUsername()                 Get the username to authenticate with.
  18   * @method Swift_SmtpTransport setPassword(string $password) Set the password to authenticate with.
  19   * @method string              getPassword()                 Get the password to authenticate with.
  20   * @method Swift_SmtpTransport setAuthMode(string $mode)     Set the auth mode to use to authenticate.
  21   * @method string              getAuthMode()                 Get the auth mode to use to authenticate.
  22   */
  23  class Swift_SmtpTransport extends Swift_Transport_EsmtpTransport
  24  {
  25      /**
  26       * Create a new SmtpTransport, optionally with $host, $port and $security.
  27       *
  28       * @param string $host
  29       * @param int    $port
  30       * @param string $security
  31       */
  32      public function __construct($host = 'localhost', $port = 25, $security = null)
  33      {
  34          call_user_func_array(
  35              array($this, 'Swift_Transport_EsmtpTransport::__construct'),
  36              Swift_DependencyContainer::getInstance()
  37                  ->createDependenciesFor('transport.smtp')
  38              );
  39  
  40          $this->setHost($host);
  41          $this->setPort($port);
  42          $this->setEncryption($security);
  43      }
  44  
  45      /**
  46       * Create a new SmtpTransport instance.
  47       *
  48       * @param string $host
  49       * @param int    $port
  50       * @param string $security
  51       *
  52       * @return Swift_SmtpTransport
  53       */
  54      public static function newInstance($host = 'localhost', $port = 25, $security = null)
  55      {
  56          return new self($host, $port, $security);
  57      }
  58  }


Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1