From fbebf54a927f4431690286d78e1fe7336f738f63 Mon Sep 17 00:00:00 2001 From: thomascube Date: Mon, 19 Dec 2011 12:42:57 +0000 Subject: Only expand one email per group member --- program/steps/mail/autocomplete.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'program') diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index 281a4e9f7..6eea705ef 100644 --- a/program/steps/mail/autocomplete.inc +++ b/program/steps/mail/autocomplete.inc @@ -28,8 +28,10 @@ if ($RCMAIL->action == 'group-expand') { $abook->set_pagesize(1000); // TODO: limit number of group members by config $result = $abook->list_records(array('email','name')); while ($result && ($sql_arr = $result->iterate())) { - foreach ((array)$sql_arr['email'] as $email) + foreach ((array)$sql_arr['email'] as $email) { $members[] = format_email_recipient($email, $sql_arr['name']); + break; // only expand one email per contact + } } $separator = trim($RCMAIL->config->get('recipients_separator', ',')) . ' '; -- cgit v1.2.3