176 Seo\Ads\MessageBase::CODE_ADS_VK,
177 Seo\Ads\MessageBase::CODE_ADS_YA,
178 Seo\Ads\MessageBase::CODE_ADS_LOOKALIKE_VK,
179 Seo\Ads\MessageBase::CODE_ADS_LOOKALIKE_YANDEX
182 if (in_array($code, $codes))
186 return self::isCloudRegionRussian();
190 return in_array(\CIntranetUtils::getPortalZone(), [
'ru',
'kz',
'by']);
199 Seo\Ads\MessageBase::CODE_ADS_FB,
200 Seo\Ads\MessageBase::CODE_ADS_LOOKALIKE_FB,
201 Message\iMarketing::CODE_FACEBOOK,
202 Message\iMarketing::CODE_INSTAGRAM,
206 return !self::isRegionRussian(
true);
321 public static function getTrackingUri(
int $type, ?
string $siteId =
null): ?string
325 case Tracker::TYPE_READ:
329 case Tracker::TYPE_CLICK:
333 case Tracker::TYPE_UNSUB:
335 $code =
'unsubscribe';
339 $uri =
"/pub/mail/$code.php";
351 && defined(
'BX24_HOST_NAME')
352 && !in_array(mb_substr(BX24_HOST_NAME, -7), [
'.com.br',
'.com.de'])
355 $domain = BX24_HOST_NAME;
357 if (!\CBitrix24::isCustomDomain())
359 $domain = preg_replace(
'/^([-\.\w]+)\.bitrix24\.([-\.\w]+)/',
'$2.$1', $domain);
360 $domain =
"mailinternetsub.com/" . $domain;
363 $uri =
"https://$domain$uri";
407 if (!self::isCloud())
412 $letters = Model\LetterTable::getList(array(
413 'select' => array(
'ID'),
415 '=STATUS' => Semantics::getWorkStates(),
416 '!MESSAGE_CODE' =>
Message\iBase::CODE_MAIL
421 foreach ($letters as $letterData)
423 $letter->load($letterData[
'ID']);
424 if (!$letter->getId())
429 $state = $letter->getState();
430 if ($state->canReady())
434 else if ($state->canStop())