• Модуль: mail
  • Путь к файлу: ~/bitrix/modules/mail/classes/general/smtp.php
  • Класс: CSMTPConnection
  • Вызов: CSMTPConnection::Authorize
function Authorize($login, $password)
{
	$authResult = $GLOBALS["USER"]->Login($login, $password, "N");

	if($authResult === true)
	{
		$this->Send("235", "Authentication successful");
		$this->auth_user_id = $GLOBALS["USER"]->GetID();
		$this->authorized = true;
		$this->WriteToLog('Authentication successful '.$this->auth_user_id, 7);
		return true;
	}

	$this->Send("535", "authorization failed");

	return false;
}