• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Mail/Protocol/Smtp/Auth/Login.php

00001 <?php
00027 require_once 'Zend/Mail/Protocol/Smtp.php';
00028 
00029 
00039 class Zend_Mail_Protocol_Smtp_Auth_Login extends Zend_Mail_Protocol_Smtp
00040 {
00046     protected $_username;
00047 
00048 
00054     protected $_password;
00055 
00056 
00065     public function __construct($host = '127.0.0.1', $port = null, $config = null)
00066     {
00067         if (is_array($config)) {
00068             if (isset($config['username'])) {
00069                 $this->_username = $config['username'];
00070             }
00071             if (isset($config['password'])) {
00072                 $this->_password = $config['password'];
00073             }
00074         }
00075 
00076         parent::__construct($host, $port, $config);
00077     }
00078 
00079 
00085     public function auth()
00086     {
00087         // Ensure AUTH has not already been initiated.
00088         parent::auth();
00089 
00090         $this->_send('AUTH LOGIN');
00091         $this->_expect(334);
00092         $this->_send(base64_encode($this->_username));
00093         $this->_expect(334);
00094         $this->_send(base64_encode($this->_password));
00095         $this->_expect(235);
00096         $this->_auth = true;
00097     }
00098 }

Generated on Thu Apr 19 2012 17:01:18 for openbiz by  doxygen 1.7.2