From 9520361123c25a96110cae4856894a595129313f Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 17 Feb 2010 10:57:09 +0000 Subject: [PATCH] get rid of comma in emailadresses, as imap_rfc_address_list assumes a new address to come after comma --- felamimail/inc/class.ajax_contacts.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/felamimail/inc/class.ajax_contacts.inc.php b/felamimail/inc/class.ajax_contacts.inc.php index 37da0b2798..f8b74b390a 100644 --- a/felamimail/inc/class.ajax_contacts.inc.php +++ b/felamimail/inc/class.ajax_contacts.inc.php @@ -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++;