3namespace Bitrix\Mail\ImapCommands;
5use Bitrix\Mail\Helper\Mailbox;
6use Bitrix\Mail\Internals\MailboxDirectoryTable;
8use Bitrix\Main\Localization\Loc;
10Loc::loadMessages(__FILE__);
53 return new Repository($this->mailboxId, $this->messagesIds);
58 return Mailbox::createInstance($this->mailboxId, $throwExceptions);
61 protected function initData($folderType =
null)
70 $this->mailbox = $this->repository->getMailbox($this->mailboxUserId);
73 return $result->addError(
new Main\
Error(Loc::getMessage(
'MAIL_CLIENT_MAILBOX_NOT_FOUND'),
74 'MAIL_CLIENT_MAILBOX_NOT_FOUND'));
82 $errorCode =
'MAIL_CLIENT_' . ($folderType == MailboxDirectoryTable::TYPE_TRASH ?
'TRASH' :
'SPAM') .
'_FOLDER_NOT_SELECTED_ERROR';
84 Loc::getMessage($errorCode),
88 if (is_null($this->messages))
90 $this->messages = $this->repository->getMessages();
93 if (empty($this->messages))
95 return $result->addError(
new Main\
Error(Loc::getMessage(
'MAIL_CLIENT_MESSAGES_NOT_FOUND'),
96 'MAIL_CLIENT_MESSAGES_NOT_FOUND'));
101 foreach ($this->messages as $index =>
$message)
103 if (in_array(
$message[
'ID'], $this->messagesIds,
true))
108 if (
count($folders) > 1)
110 return $result->addError(
new Main\
Error(Loc::getMessage(
'MAIL_CLIENT_MESSAGES_MULTIPLE_FOLDERS'),
111 'MAIL_CLIENT_MESSAGES_MULTIPLE_FOLDERS'));
118 return $this->mailboxHelper->getDirsHelper()->getDirPathByType($dirType);
123 return $this->mailboxHelper->getDirsHelper()->getDirByPath(
$path);
128 foreach ($this->messages as $index =>
$message)
131 $this->messages[$index][
'EMAIL'] = $address->getEmail();
initData($folderType=null)
__construct($mailboxId, $messagesIds, $userId=null)
getMailClientHelper($throwExceptions=true)
getDirPathByType($dirType)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"