• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sharing/notification/mail.php
  • Класс: BitrixCalendarSharingNotificationMail
  • Вызов: Mail::notifyAboutMeetingCancelled
public function notifyAboutMeetingCancelled(string $to): bool
{
	SharingHelper::setSiteLanguage();

	$ownerName = $this->getOwner()['NAME'];

	$gender = $this->getOwner()['GENDER'];
	$subject = Loc::getMessage('EC_CALENDAR_SHARING_MAIL_SUBJECT_CANCELLED', ['#NAME#' => $ownerName]);
	if ($gender === 'M')
	{
		$subject = Loc::getMessage('EC_CALENDAR_SHARING_MAIL_SUBJECT_CANCELLED_M', ['#NAME#' => $ownerName]);
	}
	if ($gender === 'F')
	{
		$subject = Loc::getMessage('EC_CALENDAR_SHARING_MAIL_SUBJECT_CANCELLED_F', ['#NAME#' => $ownerName]);
	}

	$mailParams = $this->getBaseMailParams($ownerName);

	$arParams = [
		'STATUS' => self::MEETING_STATUS_CANCELLED,
		'CALENDAR_LINK' => $this->getCalendarLink(),
		'WHO_CANCELLED' => $ownerName,
		'WHEN_CANCELLED' => $this->getWhenCancelled(),
	];
	$arParams = array_merge($arParams, $mailParams);

	return $this->sendMessage($to, $arParams, $subject);
}