コード例 #1
0
ファイル: Smtp.php プロジェクト: xudianyang/yafrk-lib
 /**
  * Connect the connection, and pass it helo
  *
  * @return Protocol\Smtp
  */
 protected function connect()
 {
     if (!$this->connection instanceof Protocol\Smtp) {
         return $this->lazyLoadConnection();
     }
     $this->connection->connect();
     $this->connection->helo($this->getOptions()->getName());
     return $this->connection;
 }
コード例 #2
0
ファイル: Plain.php プロジェクト: xudianyang/yafrk-lib
 /**
  * Perform PLAIN authentication with supplied credentials
  *
  */
 public function auth()
 {
     // Ensure AUTH has not already been initiated.
     parent::auth();
     $this->_send('AUTH PLAIN');
     $this->_expect(334);
     $this->_send(base64_encode("" . $this->getUsername() . "" . $this->getPassword()));
     $this->_expect(235);
     $this->auth = true;
 }
コード例 #3
0
ファイル: Crammd5.php プロジェクト: xudianyang/yafrk-lib
 /**
  * @todo Perform CRAM-MD5 authentication with supplied credentials
  *
  */
 public function auth()
 {
     // Ensure AUTH has not already been initiated.
     parent::auth();
     $this->_send('AUTH CRAM-MD5');
     $challenge = $this->_expect(334);
     $challenge = base64_decode($challenge);
     $digest = $this->_hmacMd5($this->getPassword(), $challenge);
     $this->_send(base64_encode($this->getUsername() . ' ' . $digest));
     $this->_expect(235);
     $this->auth = true;
 }