• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/mail/smtp/mailer.php
  • Класс: BitrixMainMailSmtpMailer
  • Вызов: Mailer::checkLimit
private function checkLimit(): bool
{
	$from = self::parseAddresses($this->From)[0]['address'];
	$count = count($this->getAllRecipientAddresses());

	$emailCounter = new SenderSendCounter();
	$emailDailyLimit = Sender::getEmailLimit($from);
	if($emailDailyLimit
		&& ($emailCounter->get($from) + $count) > $emailDailyLimit)
	{
		//daily limit exceeded
		return false;
	}

	return true;
}