From c52a8fcc0ef9acd01ac8a30d25bdc36997f65861 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Tue, 25 Feb 2014 09:33:29 -0800 Subject: [PATCH] CRM-14266 - include all system FROM emails. ---------------------------------------- * CRM-14266: send receipt from contrib/event/membership should list all configured FROM email addresses http://issues.civicrm.org/jira/browse/CRM-14266 --- CRM/Core/BAO/Email.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CRM/Core/BAO/Email.php b/CRM/Core/BAO/Email.php index d3e5be77b3..5d67769386 100644 --- a/CRM/Core/BAO/Email.php +++ b/CRM/Core/BAO/Email.php @@ -287,10 +287,12 @@ AND reset_date IS NULL $contactID = $session->get('userID'); $fromEmailValues = array(); - // add the domain email id - $domainEmail = CRM_Core_BAO_Domain::getNameAndEmail(); - $domainEmail = "$domainEmail[0] <$domainEmail[1]>"; - $fromEmailValues[$domainEmail] = htmlspecialchars($domainEmail); + // add all configured FROM email addresses + $domainFrom = CRM_Core_OptionGroup::values('from_email_address'); + foreach (array_keys($domainFrom) as $k) { + $domainEmail = $domainFrom[$k]; + $fromEmailValues[$domainEmail] = htmlspecialchars($domainEmail); + } // add logged in user's active email ids if ($contactID) { -- 2.25.1