• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/calendar/notification/notificationservice.php
  • Класс: Bitrix\Crm\Integration\Calendar\Notification\NotificationService
  • Вызов: NotificationService::sendMessage
protected function sendMessage(string $template, array $placeholders): bool
{
	$entity = new ItemIdentifier(\CCrmOwnerType::Deal, $this->crmDealLink->getEntityId());
	$channel = $this->getEntityChannel($entity);
	if (is_null($channel))
	{
		return false;
	}

	$to = $this->getToEntity($channel, $this->crmDealLink->getContactId(), $this->crmDealLink->getContactType());
	if (!$to)
	{
		return false;
	}

	return (new MessageSender\SendFacilitator\Notifications($channel))
		->setTo($to)
		->setPlaceholders($placeholders)
		->setTemplateCode($template)
		->setLanguageId('ru')
		->send()
		->isSuccess()
	;
}