コード例 #1
0
ファイル: Smtp.php プロジェクト: ryanc/php-pop3
 /**
  * Connect to the SMTP server.
  *
  * @throws Connection_Exception
  *         if the connection is already established
  *         or if PHP does not have the openssl extension loaded
  *         or if PHP failed to connect to the SMTP server
  *         or if a negative response from the SMTP server was
  *         received.
  */
 public function connect()
 {
     parent::connect();
     if ($this->_transport === 'tls') {
         $this->_starttls();
     }
     $this->_state = self::STATE_CONNECTED;
 }
コード例 #2
0
ファイル: Pop3.php プロジェクト: ryanc/php-pop3
 /**
  * Connect to the POP3 server.
  *
  * @throws Protocol\Exception
  *         if the connection is already established
  *         or if PHP does not have the openssl extension loaded
  *         or if PHP failed to connect to the POP3 server
  *         or if a negative response from the POP3 server was
  *         received.
  */
 public function connect()
 {
     parent::connect();
     $this->_state = self::STATE_AUTHORIZATION;
     if ($this->_transport === 'tls') {
         $this->_starttls();
     }
 }