Backport commit r48145, committed by Nathan Gray. Make sure the merge doesn't fail if there's no email found

This commit is contained in:
Hadi Nategh 2014-08-22 13:00:24 +00:00
parent cca8e33942
commit cbf356faab

View File

@ -5925,7 +5925,10 @@ class emailadmin_imapbase
//error_log(__METHOD__.' ('.__LINE__.') '.array2string($contact));
$email = ($contact['email'] ? $contact['email'] : $contact['email_home']);
$nfn = ($contact['n_fn'] ? $contact['n_fn'] : $contact['n_given'].' '.$contact['n_family']);
$mailObject->AddAddress(self::$idna2->encode($email),$mailObject->EncodeHeader($nfn));
if($email)
{
$mailObject->AddAddress(self::$idna2->encode($email),$mailObject->EncodeHeader($nfn));
}
}
$mailObject->Subject = $bo_merge->merge_string($Subject, $val, $e, 'text/plain', array(), self::$displayCharset);
if (!empty($AltBody))