summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/mailto.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/addressbook/mailto.inc')
-rw-r--r--program/steps/addressbook/mailto.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/steps/addressbook/mailto.inc b/program/steps/addressbook/mailto.inc
index d38ae9e62..702e1a61b 100644
--- a/program/steps/addressbook/mailto.inc
+++ b/program/steps/addressbook/mailto.inc
@@ -29,8 +29,10 @@ if ($cid && preg_match('/^[a-z0-9\+\/=_-]+(,[a-z0-9\+\/=_-]+)*$/i', $cid) && $CO
$CONTACTS->set_pagesize(100);
$recipients = $CONTACTS->search($CONTACTS->primary_key, $cid);
- while (is_object($recipients) && ($rec = $recipients->iterate()))
- $mailto[] = format_email_recipient($rec['email'], $rec['name']);
+ while (is_object($recipients) && ($rec = $recipients->iterate())) {
+ $emails = $CONTACTS->get_col_values('email', $rec, true);
+ $mailto[] = format_email_recipient($emails[0], $rec['name']);
+ }
}
if (!empty($mailto))