mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 03:13:40 +01:00
* Mail/Infolog/Tracker: fix problem with converting mail to infolog/tracker entries, when forwarded messages are attached (message/rfc822 attachments)
This commit is contained in:
parent
af38b85e5b
commit
e0b9fadfdd
@ -2492,6 +2492,7 @@ class infolog_ui
|
|||||||
$attachments[] = array(
|
$attachments[] = array(
|
||||||
'name' => trim($subject).'.eml',
|
'name' => trim($subject).'.eml',
|
||||||
'mimeType' => 'message/rfc822',
|
'mimeType' => 'message/rfc822',
|
||||||
|
'type' => 'message/rfc822',
|
||||||
'tmp_name' => $attachment_file,
|
'tmp_name' => $attachment_file,
|
||||||
'size' => $size,
|
'size' => $size,
|
||||||
);
|
);
|
||||||
@ -2512,6 +2513,7 @@ class infolog_ui
|
|||||||
$attachments[] = array(
|
$attachments[] = array(
|
||||||
'name' => $attachment['name'],
|
'name' => $attachment['name'],
|
||||||
'mimeType' => $attachment['type'],
|
'mimeType' => $attachment['type'],
|
||||||
|
'type' => $attachment['type'],
|
||||||
'tmp_name' => $attachment['file'],
|
'tmp_name' => $attachment['file'],
|
||||||
'size' => $attachment['size'],
|
'size' => $attachment['size'],
|
||||||
);
|
);
|
||||||
@ -2533,6 +2535,7 @@ class infolog_ui
|
|||||||
$attachments[] = array(
|
$attachments[] = array(
|
||||||
'name' => trim($subject).'.eml',
|
'name' => trim($subject).'.eml',
|
||||||
'mimeType' => 'message/rfc822',
|
'mimeType' => 'message/rfc822',
|
||||||
|
'type' => 'message/rfc822',
|
||||||
'tmp_name' => $attachment_file,
|
'tmp_name' => $attachment_file,
|
||||||
'size' => $size,
|
'size' => $size,
|
||||||
);
|
);
|
||||||
@ -2569,7 +2572,6 @@ class infolog_ui
|
|||||||
$mailobject->reopen($mailbox);
|
$mailobject->reopen($mailbox);
|
||||||
|
|
||||||
$mailcontent = $mailClass::get_mailcontent($mailobject,$uid,$partid,$mailbox,false,true,(!($GLOBALS['egw_info']['user']['preferences'][$sessionLocation]['saveAsOptions']==='text_only')));
|
$mailcontent = $mailClass::get_mailcontent($mailobject,$uid,$partid,$mailbox,false,true,(!($GLOBALS['egw_info']['user']['preferences'][$sessionLocation]['saveAsOptions']==='text_only')));
|
||||||
|
|
||||||
// this one adds the mail itself (as message/rfc822 (.eml) file) to the infolog as additional attachment
|
// this one adds the mail itself (as message/rfc822 (.eml) file) to the infolog as additional attachment
|
||||||
// this is done to have a simple archive functionality (ToDo: opening .eml in email module)
|
// this is done to have a simple archive functionality (ToDo: opening .eml in email module)
|
||||||
if ($GLOBALS['egw_info']['user']['preferences'][$sessionLocation]['saveAsOptions']==='add_raw')
|
if ($GLOBALS['egw_info']['user']['preferences'][$sessionLocation]['saveAsOptions']==='add_raw')
|
||||||
@ -2585,10 +2587,12 @@ class infolog_ui
|
|||||||
$mailcontent['attachments'][] = array(
|
$mailcontent['attachments'][] = array(
|
||||||
'name' => trim($subject).'.eml',
|
'name' => trim($subject).'.eml',
|
||||||
'mimeType' => 'message/rfc822',
|
'mimeType' => 'message/rfc822',
|
||||||
|
'type' => 'message/rfc822',
|
||||||
'tmp_name' => $attachment_file,
|
'tmp_name' => $attachment_file,
|
||||||
'size' => $size,
|
'size' => $size,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
//_debug_array($mailcontent);
|
||||||
return $this->edit($this->bo->import_mail(
|
return $this->edit($this->bo->import_mail(
|
||||||
$mailcontent['mailaddress'],
|
$mailcontent['mailaddress'],
|
||||||
$mailcontent['subject'],
|
$mailcontent['subject'],
|
||||||
|
@ -1705,7 +1705,7 @@ class mail_compose
|
|||||||
$size = lang('unknown');
|
$size = lang('unknown');
|
||||||
|
|
||||||
$this->addMessageAttachment($_uid, $_partID, $_folder,
|
$this->addMessageAttachment($_uid, $_partID, $_folder,
|
||||||
$mail_bo->decode_header(($headers['SUBJECT']?$headers['SUBJECT']:lang('no subject'))),
|
$mail_bo->decode_header(($headers['SUBJECT']?$headers['SUBJECT']:lang('no subject'))).'.eml',
|
||||||
'MESSAGE/RFC822', $size);
|
'MESSAGE/RFC822', $size);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user