get rid of comma in emailadresses, as imap_rfc_address_list assumes a new address to come after comma

This commit is contained in:
Klaus Leithoff 2010-02-17 10:56:48 +00:00
parent df4a507959
commit 44707ff64c

View File

@ -71,6 +71,7 @@
foreach(array($contact['email'],$contact['email_home']) as $email) {
// avoid wrong addresses, if an rfc822 encoded address is in addressbook
$email = preg_replace("/(^.*<)([a-zA-Z0-9_\-]+@[a-zA-Z0-9_\-\.]+)(.*)/",'$2',$email);
$contact['n_fn'] = str_replace(',',' ',$contact['n_fn']);
$completeMailString = addslashes(trim($contact['n_fn'] ? $contact['n_fn'] : $contact['fn']) .' <'. trim($email) .'>');
if(!empty($email) && in_array($completeMailString ,$jsArray) === false) {
$i++;