- Модуль: mail
- Путь к файлу: ~/bitrix/modules/mail/lib/message.php
- Класс: BitrixMailMessage
- Вызов: Message::wrapTheMessageWithAQuote
static function wrapTheMessageWithAQuote($body, $subject, $timeString, $from = [], $to = [], $cc = []): string
{
$fieldDateInTimeStamp = makeTimestamp($timeString);
$titleDateFormat = Context::getCurrent()->getCulture()->getFullDateFormat()."
H:i:s";
$formattedDate = FormatDate($titleDateFormat, $fieldDateInTimeStamp, (time() + CTimeZone::getOffset()));
$wrap = '';
$fromList = static::convertContactListToString($from);
$toList = static::convertContactListToString($to);
$ccList = static::convertContactListToString($cc);
$body = HelperMessage::sanitizeHtml($body);
if (empty($ccList))
{
$wrap .= Loc::getMessage('MAIL_QUOTE_MESSAGE_HEADER_WITHOUT_CC', [
'#DATE#' => $formattedDate,
'#SUBJECT#' => $subject,
'#BODY#' => $body,
'#FROM_LIST#' => $fromList,
'#TO_LIST#' => $toList,
'[blockquote]' => '',
'[/blockquote]' => '
'
]);
}
else
{
$wrap .= Loc::getMessage('MAIL_QUOTE_MESSAGE_HEADER', [
'#DATE#' => $formattedDate,
'#SUBJECT#' => $subject,
'#BODY#' => $body,
'#FROM_LIST#' => $fromList,
'#TO_LIST#' => $toList,
'#CC_LIST#' => $ccList,
'[blockquote]' => '',
'[/blockquote]' => '
'
]);
}
return $wrap;
}