CRM-14266 - include all system FROM emails.
authorDave Greenberg <dave@civicrm.org>
Tue, 25 Feb 2014 17:33:29 +0000 (09:33 -0800)
committerDave Greenberg <dave@civicrm.org>
Tue, 25 Feb 2014 17:33:29 +0000 (09:33 -0800)
----------------------------------------
* 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

index d3e5be77b35b07c7c5ac9bf5b684c3e2e87495b4..5d6776938638bf3b337dac64bb12b60e9b22267a 100644 (file)
@@ -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) {