* Mail: fix signed/encrypted S/MIME new message does not take CC or BCC fields into account

This commit is contained in:
Hadi Nategh 2018-09-17 11:08:52 +02:00
parent d18b1d4675
commit cd3f380fcd

View File

@ -3108,6 +3108,7 @@ class mail_compose
// SMIME SIGN/ENCRYPTION
if ($_formData['smime_sign'] == 'on' || $_formData['smime_encrypt'] == 'on' )
{
$recipients = array_merge($_formData['to'], (array) $_formData['cc'], (array) $_formData['bcc']);
try {
if ($_formData['smime_sign'] == 'on')
{
@ -3122,7 +3123,7 @@ class mail_compose
$smime_success = $this->_encrypt(
$mail,
$_formData['smime_encrypt'] == 'on'? Mail\Smime::TYPE_SIGN_ENCRYPT: Mail\Smime::TYPE_SIGN,
Mail::stripRFC822Addresses($_formData['to']),
Mail::stripRFC822Addresses($recipients),
$identity['ident_email'],
$_formData['smime_passphrase']
);
@ -3141,7 +3142,7 @@ class mail_compose
$smime_success = $this->_encrypt(
$mail,
Mail\Smime::TYPE_ENCRYPT,
Mail::stripRFC822Addresses($_formData['to']),
Mail::stripRFC822Addresses($recipients),
$identity['ident_email']
);
}