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

	if($this->__listenFunc == '__AuthLoginHandler')
		return $this->__AuthLoginHandler();

	if($this->__listenFunc == '__AuthPlainHandler')
		return $this->__AuthPlainHandler();

	if($this->__listenFunc == '__DataHandler')
		return $this->__DataHandler();

	if(mb_strpos($this->readBuffer, "rn") === false)
		return false;

	$this->readBuffer = Trim($this->readBuffer);

	$res = false;
	if(($p = mb_strpos($this->readBuffer, " "))!==false)
	{
		$command = mb_substr($this->readBuffer, 0, $p);
		$res = $this->__ProcessCommand($command, mb_substr($this->readBuffer, $p + 1));
	}
	else
	{
		$res = $this->__ProcessCommand($this->readBuffer);
	}

	if($res)
		$this->readBuffer = "";

	return true;
}