• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/mail.php
  • Класс: BitrixImOpenLinesMail
  • Вызов: Mail::installEventsAgent
static function installEventsAgent()
{
	$orm = BitrixMainMailInternalEventTypeTable::getList(array(
		'select' => array('ID'),
		'filter' => Array(
			'=EVENT_NAME' => Array('IMOL_HISTORY_LOG', 'IMOL_OPERATOR_ANSWER')
		)
	));

	if(!$orm->fetch())
	{
		include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/imopenlines/install/events/set_events.php");
	}

	return "";
}