• Модуль: mail
  • Путь к файлу: ~/bitrix/modules/mail/lib/imap.php
  • Класс: BitrixMailImap
  • Вызов: Imap::capability
protected function capability(&$error)
{
	$error = null;

	if (!$this->sessState)
	{
		$error = $this->errorMessage(Imap::ERR_CAPABILITY);
		return false;
	}

	$response = $this->executeCommand('CAPABILITY', $error);

	if ($error)
	{
		$error = $error == Imap::ERR_COMMAND_REJECTED ? null : $error;
		$error = $this->errorMessage(array(Imap::ERR_CAPABILITY, $error), $response);

		return false;
	}

	$regex = '/^ * x20 CAPABILITY /ix';
	foreach ($this->getUntagged($regex, true) as $item)
		$this->sessCapability = $item[0];

	return true;
}