Fix mail integration fails on SMIME authentication failure.

This commit is contained in:
Hadi Nategh 2018-02-08 15:25:42 +01:00
parent c666b157ba
commit cec3cc2170

View File

@ -293,6 +293,7 @@ class mail_integration {
$mo = mail_bo::getInstance(true,$icServerID);
$mo->openConnection();
$mo->reopen($mailbox);
try {
$mailcontent = mail_bo::get_mailcontent($mo,$uid,'',$mailbox,null,true,(!($GLOBALS['egw_info']['user']['preferences'][$sessionLocation]['saveAsOptions']==='text_only')));
// this one adds the mail itself (as message/rfc822 (.eml) file) to the app as additional attachment
// this is done to have a simple archive functionality (ToDo: opening .eml in email module)
@ -316,6 +317,12 @@ class mail_integration {
}
$mailcontent['date'] = strtotime($mailcontent['headers']['DATE']);
}
catch (Exception $ex) {
EGroupware\Api\Framework::message(lang('Fetching content of this message failed'.
' because the content of this message seems to be encrypted'.
' and can not be decrypted properly.'),'error');
}
}
}
// Convert addresses to email and personal