1C-Bitrix 25.700.0
sender.php
См. документацию.
1<?php
2
3namespace Bitrix\Main\Mail;
4
5use Bitrix\Main;
6use Bitrix\Main\Error;
7use Bitrix\Main\Engine\CurrentUser;
8use Bitrix\Main\ORM\Data\UpdateResult;
9use Bitrix\Main\Localization\Loc;
10use Bitrix\Main\Mail\Internal\SenderTable;
11use Bitrix\Main\Event;
12use Bitrix\Main\Mail\Sender\UserSenderDataProvider;
13
14class Sender
15{
16 public const MAIN_SENDER_SMTP_LIMIT_DECREASE = 'MainSenderSmtpLimitDecrease';
17 private const MAIN_SENDER_SMTP_SERVER_PATTERN = '/^([a-z0-9-]+\.)+[a-z0-9-]{2,20}$/i';
18
19 public static function add(array $fields)
20 {
21 $fields['NAME'] = $fields['NAME'] ?? '';
22 if (
23 $fields['NAME'] !== ''
25 )
26 {
27 $checkResult = self::checkSenderNameCharacters($fields['NAME']);
28 if (!$checkResult->isSuccess())
29 return [
30 'errors' => $checkResult->getErrorCollection(),
31 ];
32 }
33
34 if (empty($fields['OPTIONS']) || !is_array($fields['OPTIONS']))
35 {
36 $fields['OPTIONS'] = array();
37 }
38
39 self::checkEmail($fields, $error, $errors);
40 if ($error || $errors)
41 {
42 return array('error' => $error, 'errors' => $errors);
43 }
44
45 if (empty($fields['IS_CONFIRMED']))
46 {
47 $fields['OPTIONS']['confirm_code'] = \Bitrix\Main\Security\Random::getStringByCharsets(5, '0123456789abcdefghjklmnpqrstuvwxyz');
48 $fields['OPTIONS']['confirm_time'] = time();
49 }
50
51 $senderId = 0;
53 if ($result->isSuccess())
54 {
55 $senderId = $result->getId();
56 }
57
58 if (empty($fields['IS_CONFIRMED']))
59 {
60 $mailEventFields = array(
61 'DEFAULT_EMAIL_FROM' => $fields['EMAIL'],
62 'EMAIL_TO' => $fields['EMAIL'],
63 'MESSAGE_SUBJECT' => Loc::getMessage('MAIN_MAIL_CONFIRM_MESSAGE_SUBJECT'),
64 'CONFIRM_CODE' => mb_strtoupper($fields['OPTIONS']['confirm_code']),
65 );
66
67 if (!empty($smtpConfig))
68 {
69 \Bitrix\Main\EventManager::getInstance()->addEventHandlerCompatible(
70 'main',
71 'OnBeforeEventSend',
72 function (&$eventFields, &$message, $context) use (&$smtpConfig)
73 {
74 $context->setSmtp($smtpConfig);
75 }
76 );
77 }
78
79 \CEvent::sendImmediate('MAIN_MAIL_CONFIRM_CODE', SITE_ID, $mailEventFields);
80 }
81 else
82 {
83 if (isset($fields['OPTIONS']['__replaces']) && $fields['OPTIONS']['__replaces'] > 0)
84 {
86 (int) $fields['OPTIONS']['__replaces']
87 );
88 }
89 }
90
91 return ['senderId' => $senderId, 'confirmed' => !empty($fields['IS_CONFIRMED'])];
92 }
93
94 public static function updateSender(int $senderId, array $fields, bool $checkSenderAccess = true): UpdateResult
95 {
96 $updateFields = [];
97 $result = new UpdateResult();
98
99 if ($checkSenderAccess)
100 {
101 $checkResult = self::canEditSender($senderId);
102 if (!$checkResult->isSuccess())
103 {
104 $result->addErrors($checkResult->getErrors());
105
106 return $result;
107 }
108 }
109
110 $sender = Internal\SenderTable::getById($senderId)->fetch();
111
112 if (!empty($fields['EMAIL']) && $fields['EMAIL'] !== $sender['EMAIL'])
113 {
114 $updateFields['EMAIL'] = (string)$fields['EMAIL'];
115 }
116
117 if (!empty($fields['IS_PUBLIC']) && $fields['IS_PUBLIC'] !== $sender['IS_PUBLIC'])
118 {
119 $updateFields['IS_PUBLIC'] = (int)$fields['IS_PUBLIC'] === 1 ? 1 : 0;
120 }
121
122 if (!empty($fields['OPTIONS']['smtp']) && empty($fields['OPTIONS']['smtp']['password']))
123 {
124 $fields['OPTIONS']['smtp']['password'] = $sender['OPTIONS']['smtp']['password'];
125 }
126 if (
127 !empty($fields['OPTIONS']['smtp'])
128 && $fields['OPTIONS']['smtp'] !== $sender['OPTIONS']['smtp']
129 )
130 {
131 $smtp = $fields['OPTIONS']['smtp'];
132 $checkResult = self::prepareSmtpConfigForSender($smtp);
133 if (!$checkResult->isSuccess())
134 {
135 $result->addErrors($checkResult->getErrors());
136
137 return $result;
138 }
139 $sender['OPTIONS']['smtp'] = $smtp;
140 $updateFields['OPTIONS'] = $sender['OPTIONS'];
141 }
142
143 if (
144 !is_null($fields['NAME'])
145 && $fields['NAME'] !== $sender['NAME']
146 )
147 {
148 $name = (string)$fields['NAME'];
149 $checkResult = self::checkSenderNameCharacters($name);
150 if (!$checkResult->isSuccess())
151 {
152 $result->addErrors($checkResult->getErrors());
153
154 return $result;
155 }
156
157 if ($sender['PARENT_MODULE_ID'] === 'mail' && Main\Loader::includeModule('mail'))
158 {
159 $result = \Bitrix\Mail\MailboxTable::update($sender['PARENT_ID'], ['USERNAME' => $name]);
160 if (!$result->isSuccess())
161 {
162 return $result;
163 }
164 }
165 $updateFields['NAME'] = $name;
166 }
167
168 if (!empty($updateFields))
169 {
170 $result = Internal\SenderTable::update($senderId, $updateFields);
171
172 if (!empty($updateFields['OPTIONS']['smtp']['limit']))
173 {
174 self::setEmailLimit($sender['EMAIL'], $updateFields['OPTIONS']['smtp']['limit']);
175 }
176 }
177
178 return $result;
179 }
180
187 public static function checkEmail(&$fields, &$error = null, Main\ErrorCollection &$errors = null)
188 {
189
190 if (empty($fields['IS_CONFIRMED']) && !empty($fields['OPTIONS']['smtp']))
191 {
192 $smtpConfig = $fields['OPTIONS']['smtp'];
193 $smtpConfig = new Smtp\Config(array(
194 'from' => $fields['EMAIL'],
195 'host' => $smtpConfig['server'],
196 'port' => $smtpConfig['port'],
197 'protocol' => $smtpConfig['protocol'],
198 'login' => $smtpConfig['login'],
199 'password' => $smtpConfig['password'],
200 'isOauth' => $smtpConfig['isOauth'] ?? false,
201 ));
202
203 if ($smtpConfig->canCheck())
204 {
205 if ($smtpConfig->check($error, $errors))
206 {
207 $fields['IS_CONFIRMED'] = true;
208 }
209 }
210 }
211 }
212
213 public static function confirm($ids)
214 {
215 if (!empty($ids))
216 {
218 'filter' => array(
219 '@ID' => (array) $ids,
220 ),
221 ));
222
223 while ($item = $res->fetch())
224 {
226 (int) $item['ID'],
227 array(
228 'IS_CONFIRMED' => true,
229 )
230 );
231
232 if (isset($item['OPTIONS']['__replaces']) && $item['OPTIONS']['__replaces'] > 0)
233 {
235 (int) $item['OPTIONS']['__replaces']
236 );
237 }
238 }
239 }
240 }
241
242 public static function deleteSenderByMailboxId(int $mailboxId): void
243 {
244 if(!Main\Loader::includeModule('mail'))
245 {
246 return;
247 }
248
250 'filter' => [
251 '=PARENT_MODULE_ID' => 'mail',
252 '=PARENT_ID' => $mailboxId,
253 ],
254 ])->fetch();
255
256 if ($sender)
257 {
258 self::delete([(int)$sender['ID']]);
259 }
260 }
261
262 public static function delete(array $sendersId): void
263 {
264 foreach ($sendersId as $senderId)
265 {
266 $id = (int)$senderId;
267 $currentSender = Internal\SenderTable::getById($id)->fetch();
268
269 if (!$currentSender)
270 {
271 continue;
272 }
273
275 if (!$result->isSuccess())
276 {
277 continue;
278 }
279
280 $aliasesForPossibleDeletion = [];
281 if (!empty($currentSender['OPTIONS']['smtp']['server']) && empty(self::getPublicSmtpSenderByEmail($currentSender['EMAIL'], $id)) && $currentSender['USER_ID'])
282 {
284 'filter' => [
285 '=EMAIL' => $currentSender['EMAIL'],
286 '=USER_ID' => $currentSender['USER_ID'],
287 ],
288 ]);
289
290 while ($sender = $res->fetch())
291 {
292 $aliasesForPossibleDeletion[$sender['USER_ID']][] = $sender;
293 }
294 }
295
296 if (!$aliasesForPossibleDeletion)
297 {
298 continue;
299 }
300
301 foreach ($aliasesForPossibleDeletion as $userId => $aliases)
302 {
303 if (self::hasUserAvailableSmtpSenderByEmail($currentSender['EMAIL'], $userId, true))
304 {
305 continue;
306 }
307
308 foreach ($aliases as $alias)
309 {
310 SenderTable::delete($alias['ID']);
311 }
312 }
313 }
314 }
315
316 public static function clearCustomSmtpCache($email)
317 {
318 $cache = new \CPHPCache();
319 $cache->clean($email, '/main/mail/smtp');
320 }
321
322 public static function getCustomSmtp($email)
323 {
324 static $smtp = array();
325
326 if (!isset($smtp[$email]))
327 {
328 $config = false;
329
330 $cache = new \CPHPCache();
331
332 if ($cache->initCache(30*24*3600, $email, '/main/mail/smtp'))
333 {
334 $config = $cache->getVars();
335 }
336 else
337 {
339 'filter' => array(
340 'IS_CONFIRMED' => true,
341 '=EMAIL' => $email,
342 ),
343 'order' => array(
344 'ID' => 'DESC',
345 ),
346 ));
347 while ($item = $res->fetch())
348 {
349 if (!empty($item['OPTIONS']['smtp']['server']) && empty($item['OPTIONS']['smtp']['encrypted']))
350 {
351 $config = $item['OPTIONS']['smtp'];
352 break;
353 }
354 }
355
356 $cache->startDataCache();
357 $cache->endDataCache($config);
358 }
359
360 if ($config)
361 {
363 'from' => $email,
364 'host' => $config['server'],
365 'port' => $config['port'],
366 'protocol' => $config['protocol'],
367 'login' => $config['login'],
368 'password' => $config['password'],
369 'isOauth' => $config['isOauth'],
370 ));
371 // config will be replaced with null value due errors
372 $config = (new Main\Mail\Smtp\OAuthConfigPreparer())->prepareBeforeSendIfNeed($config);
373 }
374
375 $smtp[$email] = $config;
376 }
377
378 return $smtp[$email];
379 }
380
389 public static function getEmailLimit($email): ?int
390 {
391 $address = new \Bitrix\Main\Mail\Address($email);
392
393 if (!$address->validate())
394 {
395 return null;
396 }
397
398 $email = $address->getEmail();
399 static $mailLimit = array();
400
401 if (!isset($mailLimit[$email]))
402 {
403 $cache = new \CPHPCache();
404
405 if ($cache->initCache(3600, $email, '/main/mail/limit'))
406 {
407 $mailLimit[$email] = $cache->getVars();
408 }
409 else
410 {
412 'filter' => array(
413 'IS_CONFIRMED' => true,
414 '=EMAIL' => $email,
415 ),
416 'order' => array(
417 'ID' => 'DESC',
418 ),
419 ));
420 $limit = null;
421 while ($item = $res->fetch())
422 {
423 if ($item['OPTIONS']['smtp']['limit'] !== null)
424 {
425 $limit = (int)$item['OPTIONS']['smtp']['limit'];
426 break;
427 }
428 }
429
430 $mailLimit[$email] = $limit;
431
432 $cache->startDataCache();
433 $cache->endDataCache($mailLimit[$email]);
434 }
435 }
436
437 return $mailLimit[$email] < 0 ? 0 : $mailLimit[$email];
438 }
439
451 public static function setEmailLimit(string $email, int $limit, bool $quite = true): bool
452 {
453 $address = new \Bitrix\Main\Mail\Address($email);
454
455 if (!$address->validate())
456 {
457 return false;
458 }
459
460 $email = $address->getEmail();
461
462 $cache = new \CPHPCache();
463 $cache->clean($email, '/main/mail/limit');
464
466 'filter' => array(
467 'IS_CONFIRMED' => true,
468 '=EMAIL' => $email,
469 ),
470 'order' => array(
471 'ID' => 'DESC',
472 ),
473 ));
474
475 if ($limit < 0)
476 {
477 $limit = 0;
478 }
479
480 $hasChanges = false;
481 while ($item = $res->fetch())
482 {
483 $oldLimit = (int)($item['OPTIONS']['smtp']['limit'] ?? 0);
484 if ($item['OPTIONS']['smtp'] && $limit !== $oldLimit)
485 {
486 $item['OPTIONS']['smtp']['limit'] = $limit;
487 $updateResult = Internal\SenderTable::update($item['ID'], ['OPTIONS' => $item['OPTIONS']]);
488 $hasChanges = true;
489 if (!$quite && ($limit < $oldLimit || $oldLimit <= 0) && $updateResult->isSuccess())
490 {
491 $event = new Event('main', self::MAIN_SENDER_SMTP_LIMIT_DECREASE, ['EMAIL'=>$email]);
492 $event->send();
493 }
494 }
495 }
496
497 return $hasChanges;
498 }
499
508 public static function removeEmailLimit(string $email): bool
509 {
510 $address = new \Bitrix\Main\Mail\Address($email);
511
512 if (!$address->validate())
513 {
514 return false;
515 }
516
517 $email = $address->getEmail();
518 $cache = new \CPHPCache();
519 $cache->clean($email, '/main/mail/limit');
520
522 'filter' => array(
523 'IS_CONFIRMED' => true,
524 '=EMAIL' => $email,
525 ),
526 'order' => array(
527 'ID' => 'DESC',
528 ),
529 ));
530
531 while ($item = $res->fetch())
532 {
533 if (isset($item['OPTIONS']['smtp']['limit']))
534 {
535 unset($item['OPTIONS']['smtp']['limit']);
536 Internal\SenderTable::update($item['ID'], ['OPTIONS' => $item['OPTIONS']]);
537 }
538 }
539
540 return true;
541 }
542
543 public static function applyCustomSmtp($event)
544 {
545 $headers = $event->getParameter('arguments')->additional_headers;
546 $context = $event->getParameter('arguments')->context;
547
548 if (empty($context) || !($context instanceof Context))
549 {
550 return;
551 }
552
553 if ($context->getSmtp() && $context->getSmtp()->getHost())
554 {
555 return;
556 }
557
558 if (preg_match('/X-Bitrix-Mail-SMTP-Host:/i', $headers))
559 {
560 return;
561 }
562
563 $eol = Mail::getMailEol();
564 $eolh = preg_replace('/([a-f0-9]{2})/i', '\x\1', bin2hex($eol));
565
566 if (preg_match(sprintf('/(^|%1$s)From:(.+?)(%1$s([^\s]|$)|$)/is', $eolh), $headers, $matches))
567 {
568 $address = new Address(preg_replace(sprintf('/%s\s+/', $eolh), '', $matches[2]));
569 if ($address->validate())
570 {
571 if ($customSmtp = static::getCustomSmtp($address->getEmail()))
572 {
573 $context->setSmtp($customSmtp);
574 }
575 }
576 }
577 }
578
579 public static function prepareUserMailboxes($userId = null)
580 {
581 global $USER;
582
583 static $mailboxes = array();
584
585 if (!($userId > 0))
586 {
587 if (is_object($USER) && $USER->isAuthorized())
588 {
589 $userId = $USER->getId();
590 }
591 }
592
593 if (!($userId > 0))
594 {
595 return array();
596 }
597
599 }
600
601 public static function prepareSmtpConfigForSender(array &$smtp): Main\Result
602 {
603 $result = new Main\Result();
604
605 if (!empty($smtp['limit']))
606 {
607 $limit = (int)$smtp['limit'];
608 $limit = max($limit, 0);
609 }
610
611 $smtp['protocol'] = self::isSmtpsConfigured($smtp) ? 'smtps' : 'smtp';
612
613 $smtp = [
614 'server' => mb_strtolower(trim($smtp['server'] ?? '')),
615 'port' => (int)($smtp['port'] ?? 0),
616 'protocol' => $smtp['protocol'],
617 'login' => $smtp['login'] ?? '',
618 'password' => $smtp['password'] ?? '',
619 'isOauth' => (bool)$smtp['isOauth'] ?? false,
620 'limit' => $limit ?? null,
621 ];
622
623 if (!preg_match(self::MAIN_SENDER_SMTP_SERVER_PATTERN, $smtp['server']))
624 {
625 $message = Loc::getMessage(
626 empty($smtp['server'])
627 ? 'MAIN_SENDER_EMPTY_SMTP_SERVER'
628 : 'MAIN_SENDER_INVALID_SMTP_SERVER'
629 );
630
631 return $result->addError(new Error($message));
632 }
633
634 if (!preg_match('/^[0-9]+$/i', $smtp['port']) || $smtp['port'] < 1 || $smtp['port'] > 65535)
635 {
636 $errorMessage = Loc::getMessage(
637 empty($smtp['port'])
638 ? 'MAIN_SENDER_EMPTY_SMTP_PORT'
639 : 'MAIN_SENDER_INVALID_SMTP_PORT'
640 );
641
642 return $result->addError(new Error($errorMessage));
643 }
644
645 if (empty($smtp['login']))
646 {
647 $errorMessage = Loc::getMessage('MAIN_SENDER_EMPTY_SMTP_LOGIN');
648
649 return $result->addError(new Error($errorMessage));
650 }
651
652 if (empty($smtp['password']))
653 {
654 $errorMessage = Loc::getMessage('MAIN_MAIL_CONFIRM_EMPTY_SMTP_PASSWORD');
655
656 return $result->addError(new Error($errorMessage));
657 }
658
659 if (preg_match('/^\^/', $smtp['password']))
660 {
661 $errorMessage = Loc::getMessage('MAIN_SENDER_INVALID_SMTP_PASSWORD');
662
663 return $result->addError(new Error($errorMessage));
664 }
665
666 $smtpConfig = new Smtp\Config([
667 'from' => $smtp['login'],
668 'host' => $smtp['server'],
669 'port' => $smtp['port'],
670 'protocol' => $smtp['protocol'],
671 'login' => $smtp['login'],
672 'password' => $smtp['password'],
673 'isOauth' => $smtp['isOauth'],
674 ]);
675
676 if ($smtpConfig->canCheck())
677 {
678 $smtpConfig->check($error, $errors);
679 }
680
681 if (!empty($error))
682 {
683 $result->addError(new Error($error));
684 }
685 else if (!empty($errors) && $errors instanceof Main\ErrorCollection)
686 {
687 $result->addErrors($errors->toArray());
688 }
689
690 return $result;
691 }
692
696 public static function hasUserSenderWithEmail(string $email, int $userId = null): bool
697 {
698 if (!($userId > 0))
699 {
700 global $USER;
701
702 if (is_object($USER) && $USER->isAuthorized())
703 {
704 $userId = $USER->getId();
705 }
706 }
707
708 $filter = [
709 '=IS_CONFIRMED' => true,
710 '=EMAIL' => $email,
711 '=USER_ID' => $userId,
712 '=PARENT_MODULE_ID' => 'main',
713 ];
714
716 'filter' => $filter,
717 ]);
718
719 while ($item = $res->fetch())
720 {
721 if (!empty($item['OPTIONS']['smtp']['server']))
722 {
723 return true;
724 }
725 }
726
727 return false;
728 }
729
730 public static function canEditSender(int $senderId): Main\Result
731 {
732 $result = new Main\Result();
733
734 $sender = Internal\SenderTable::getById($senderId)->fetch();
735 if (!$sender)
736 {
737 $result->addError(new Error(Loc::getMessage('MAIN_MAIL_SENDER_UNKNOWN_SENDER_ERROR')));
738
739 return $result;
740 }
741
742 $userId = (int)CurrentUser::get()->getId();
743 if (!$userId)
744 {
745 $result->addError(new Error('User is not authorized'));
746
747 return $result;
748 }
749
750 if (
751 (int)$sender['USER_ID'] !== $userId
753 )
754 {
755 $result->addError(new Error(Loc::getMessage('MAIN_MAIL_SENDER_EDIT_ERROR')));
756 }
757
758 return $result;
759 }
760
764 public static function getPublicSmtpSenderByEmail(string $email, int $senderId = null, bool $onlyWithSmtp = true): ?int
765 {
766 $filter = [
767 '=IS_CONFIRMED' => true,
768 '=EMAIL' => $email,
769 '=IS_PUBLIC' => true,
770 '!=ID' => $senderId,
771 ];
772
774 'filter' => $filter,
775 ]);
776
777 while ($item = $res->fetch()) {
778 if (
779 (!empty($item['OPTIONS']['smtp']['server']) && empty($item['OPTIONS']['smtp']['encrypted']))
780 || !$onlyWithSmtp
781 )
782 {
783 return $item['ID'];
784 }
785 }
786
787 return null;
788 }
789
790 public static function hasUserAvailableSmtpSenderByEmail(string $email, int $userId, bool $onlyWithSmtp = false): bool
791 {
792 if (self::getPublicSmtpSenderByEmail($email, onlyWithSmtp: $onlyWithSmtp))
793 {
794 return true;
795 }
796
798
799 $requiredTypes = [
802 ];
803
804 foreach ($senders as $sender)
805 {
806 if (in_array($sender['type'],$requiredTypes) || !$onlyWithSmtp)
807 {
808 return true;
809 }
810 }
811
812 return false;
813 }
814
821 public static function checkSenderNameCharacters(string $name): Main\Result
822 {
823 $result = new Main\Result();
824 // regex checks for characters other than letters of the alphabet, numbers, spaces
825 // and special characters ("-", ".", "'", "(", ")", ",")
826 $pattern = '/[^\p{L}\p{N}\p{Zs}\-.\'(),]+/u';
827 if (preg_match($pattern, $name))
828 {
829 $result->addError(new Error(Loc::getMessage('MAIN_MAIL_SENDER_INVALID_NAME')));
830 }
831
832 return $result;
833 }
834
835 private static function isSmtpsConfigured(array $smtpSettings): bool
836 {
837 return
838 ($smtpSettings['protocol'] ?? '') === 'smtps'
839 || ($smtpSettings['ssl'] ?? '') === 'Y'
840 ;
841 }
842
843}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
Определения error.php:15
Определения event.php:5
static getInstance()
Определения eventmanager.php:31
static includeModule($moduleName)
Определения loader.php:67
static add(array $data)
Определения sendertable.php:35
static getMailEol()
Определения mail.php:856
static getUserAvailableSenders(?int $userId=null)
Определения usersenderdataprovider.php:24
static getUserFormattedName(?int $userId=null)
Определения usersenderdataprovider.php:435
static getUserAvailableSendersByEmail(string $email, int $userId=null)
Определения usersenderdataprovider.php:146
static updateSender(int $senderId, array $fields, bool $checkSenderAccess=true)
Определения sender.php:94
static checkSenderNameCharacters(string $name)
Определения sender.php:821
static removeEmailLimit(string $email)
Определения sender.php:508
static hasUserSenderWithEmail(string $email, int $userId=null)
Определения sender.php:696
static getPublicSmtpSenderByEmail(string $email, int $senderId=null, bool $onlyWithSmtp=true)
Определения sender.php:764
static checkEmail(&$fields, &$error=null, Main\ErrorCollection &$errors=null)
Определения sender.php:187
static hasUserAvailableSmtpSenderByEmail(string $email, int $userId, bool $onlyWithSmtp=false)
Определения sender.php:790
static prepareSmtpConfigForSender(array &$smtp)
Определения sender.php:601
static deleteSenderByMailboxId(int $mailboxId)
Определения sender.php:242
static getEmailLimit($email)
Определения sender.php:389
static confirm($ids)
Определения sender.php:213
static getCustomSmtp($email)
Определения sender.php:322
const MAIN_SENDER_SMTP_LIMIT_DECREASE
Определения sender.php:16
static add(array $fields)
Определения sender.php:19
static prepareUserMailboxes($userId=null)
Определения sender.php:579
static clearCustomSmtpCache($email)
Определения sender.php:316
static setEmailLimit(string $email, int $limit, bool $quite=true)
Определения sender.php:451
static applyCustomSmtp($event)
Определения sender.php:543
static canEditSender(int $senderId)
Определения sender.php:730
static getById($id)
Определения datamanager.php:364
static getList(array $parameters=array())
Определения datamanager.php:431
static delete($primary)
Определения datamanager.php:1644
static update($primary, array $data)
Определения datamanager.php:1256
static getStringByCharsets($length, $charsetList)
Определения random.php:115
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
$errors
Определения iblock_catalog_edit.php:74
$filter
Определения iblock_catalog_list.php:54
while($arParentIBlockProperty=$dbParentIBlockProperty->Fetch()) $errorMessage
global $USER
Определения csv_new_run.php:40
$context
Определения csv_new_setup.php:223
$name
Определения menu_edit.php:35
Определения culture.php:9
$email
Определения payment.php:49
$message
Определения payment.php:8
$event
Определения prolog_after.php:141
$config
Определения quickway.php:69
if(!Loader::includeModule('sale')) $pattern
Определения index.php:20
$matches
Определения index.php:22
const SITE_ID
Определения sonet_set_content_view.php:12
$error
Определения subscription_card_product.php:20
$fields
Определения yandex_run.php:501