- Rephrase warning message for reading encrypted mails with no relevant 
pubkey and privkey
- If no mimeType provided set it to default type from mime object
This commit is contained in:
Hadi Nategh 2017-09-04 10:20:04 +02:00
parent bde19f6f6c
commit ee092b0d5a

View File

@ -7346,7 +7346,7 @@ class Mail
), $_params); ), $_params);
$metadata = array ( $metadata = array (
'mimeType' => $params['mimeType'] 'mimeType' => $params['mimeType']?$params['mimeType']:$_mime_part->getType()
); );
$this->smime = new Mail\Smime; $this->smime = new Mail\Smime;
$message = $this->getMessageRawBody($params['uid'], null, $params['mailbox']); $message = $this->getMessageRawBody($params['uid'], null, $params['mailbox']);
@ -7358,7 +7358,9 @@ class Mail
} }
catch(\Horde_Crypt_Exception $e) catch(\Horde_Crypt_Exception $e)
{ {
throw new Mail\Smime\PassphraseMissing(lang('Could not decrypt S/MIME data. This message may not be encrypted by your public key.')); throw new Mail\Smime\PassphraseMissing(lang('Could not decrypt '.
'S/MIME data. This message may not be encrypted by your '.
'public key and not being able to find corresponding private key.'));
} }
$metadata['encrypted'] = true; $metadata['encrypted'] = true;
} }