diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Mail/Protocol/Smtp/Auth/Plain.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Mail/Protocol/Smtp/Auth/Plain.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,96 @@ +_username = $config['username']; + } + if (isset($config['password'])) { + $this->_password = $config['password']; + } + } + + parent::__construct($host, $port, $config); + } + + + /** + * Perform PLAIN authentication with supplied credentials + * + * @return void + */ + public function auth() + { + // Ensure AUTH has not already been initiated. + parent::auth(); + + $this->_send('AUTH PLAIN'); + $this->_expect(334); + $this->_send(base64_encode("\0" . $this->_username . "\0" . $this->_password)); + $this->_expect(235); + $this->_auth = true; + } +}