Set title for attachment file in Delivery Status Notification email

This commit is contained in:
Hadi Nategh 2017-07-04 13:17:33 +02:00
parent dfeee51283
commit 50f55a7144

View File

@ -2401,6 +2401,18 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
{ {
$attachmentHTMLBlock=''; $attachmentHTMLBlock='';
$attachmentHTML = array(); $attachmentHTML = array();
// skip message/delivery-status and set a title for original eml file
if (($attachments[0]['mimeType'] === 'message/delivery-status'))
{
unset($attachments[0]);
if (is_array($attachments))
{
$attachments = array_values($attachments);
$attachments[0]['name'] = lang('Original Email Content');
}
}
if (is_array($attachments) && count($attachments) > 0) { if (is_array($attachments) && count($attachments) > 0) {
$url_img_vfs = Api\Html::image('filemanager','navbar', lang('Filemanager'), ' height="16"'); $url_img_vfs = Api\Html::image('filemanager','navbar', lang('Filemanager'), ' height="16"');
$url_img_vfs_save_all = Api\Html::image('mail','save_all', lang('Save all')); $url_img_vfs_save_all = Api\Html::image('mail','save_all', lang('Save all'));