12 public static function getList($forUserId =
null)
16 $userMailboxes = \Bitrix\Main\Mail\Sender::prepareUserMailboxes($forUserId);
17 if (is_array($userMailboxes))
19 foreach ($userMailboxes as $mailbox)
21 $formatted = isset($mailbox[
'formatted']) ? $mailbox[
'formatted'] : $mailbox[
'formated'];
23 'name' => $mailbox[
'name'],
24 'email' => $mailbox[
'email'],
25 'formatted' => preg_replace(
"/^<(.*)>$/i",
"$1", $formatted),
30 if (Loader::includeModule(
"sender")
31 && !\
Bitrix\Sender\Integration\Bitrix24\Service::isCloud())
33 $addressFromList = \Bitrix\Sender\MailingChainTable::getEmailFromList();
34 $address = new \Bitrix\Main\Mail\Address();
35 foreach ($addressFromList as $email)
37 $address->set($email);
38 $formatted = $address->get();
45 'name' => $address->getName(),
46 'email' => $address->getEmail(),
47 'formatted' => preg_replace(
"/^<(.*)>$/i",
"$1", $formatted),