• Модуль: mail
  • Путь к файлу: ~/bitrix/modules/mail/classes/general/smtp.php
  • Класс: CSMTPConnection
  • Вызов: CSMTPConnection::__AuthLoginHandler
function __AuthLoginHandler()
{
	if(mb_strpos($this->readBuffer, "rn") === false)
		return false;

	$this->readBuffer = trim($this->readBuffer);
	if($this->readBuffer=="*")
		$this->Send('501', 'AUTH aborted');
	else
	{
		$pwd = base64_decode($this->readBuffer);
		if($this->__login === false)
		{
			$this->__login = $pwd;
			$this->Send('334', 'UGFzc3dvcmQ6');
			$this->readBuffer = "";
			return false;
		}
		else
		{
			$this->Authorize($this->__login, $pwd);
		}
	}

	$this->__login = false;
	$this->readBuffer = "";
	$this->__listenFunc = false;
	return true;
}