• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/mailmanager.php
  • Класс: Bitrix\Crm\Integration\MailManager
  • Вызов: MailManager::getChannelsList
static function getChannelsList(array $toListByType, int $userId): array
{
	if (!self::canUse())
	{
		return [];
	}

	$channel = new Channel(
		self::class,
		[
			'id' => self::getSenderCode(),
			'isDefault' => true,
			'name' => 'Mail',
			'shortName' => 'Mail',
		],
		self::getFromList($userId),
		$toListByType[\Bitrix\Crm\Multifield\Type\Email::ID] ?? [],
		$userId,
	);

	return [$channel];
}