diff --git a/api/src/Mail.php b/api/src/Mail.php index 94ad19e460..8297824099 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -7594,7 +7594,7 @@ class Mail $params = array ( 'type' => 'message', - 'pubkey' => $certkey[$acc_smime['acc_smime_username']], + 'pubkey' => $certkey[strtolower($acc_smime['acc_smime_username'])], 'privkey' => $acc_smime['pkey'], 'passphrase'=> $_passphrase ); diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 2d52898f04..4a2465a4cc 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -3816,7 +3816,7 @@ class mail_compose { $sender_cert = $AB->get_smime_keys($sender); if (!$sender_cert) throw new Exception("S/MIME Encryption failed because no certificate has been found for sender address: " . $sender); - $params['senderPubKey'] = $sender_cert[$sender]; + $params['senderPubKey'] = $sender_cert[strtolower($sender)]; if (isset($sender) && ($type == Mail\Smime::TYPE_SIGN || $type == Mail\Smime::TYPE_SIGN_ENCRYPT)) {