- Модуль: mail
- Путь к файлу: ~/bitrix/modules/mail/lib/item/message.php
- Класс: BitrixMailItemMessage
- Вызов: Message::toArray
public function toArray(): array
{
return [
self::FIELD_ID => $this->getId(),
self::FIELD_MSG_ID => $this->getMsgId(),
self::FIELD_MAILBOX_ID => $this->getMailboxId(),
self::FIELD_SUBJECT => $this->getSubject(),
self::FIELD_BODY => $this->getBody(),
self::FIELD_BODY_HTML => $this->getBodyHtml(),
self::FIELD_FROM => $this->getFrom(),
self::FIELD_TO => $this->getTo(),
self::FIELD_DATE => $this->getDate()->format('Y-m-d H:i:s'),
];
}