$form->_pId = CRM_Utils_Request::retrieve('participantId', 'Positive', $form);
$form->_discountId = CRM_Utils_Request::retrieve('discountId', 'Positive', $form);
- // @todo - stop setting this, call the function, as appropriate. This is in a weird place.
- $form->_fromEmails = CRM_Event_BAO_Event::getFromEmailIds($form->_eventId);
-
//CRM-6907 set event specific currency.
if ($form->_eventId &&
($currency = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $form->_eventId, 'currency'))
}
}
$this->assign('customGroup', $customGroup);
+
+ $fromEmails = CRM_Event_BAO_Event::getFromEmailIds($this->getEventID());
foreach ($this->_contactIds as $num => $contactID) {
// Retrieve the name and email of the contact - this will be the TO for receipt email
[, $this->_contributorEmail, $this->_toDoNotEmail] = CRM_Contact_BAO_Contact::getContactDetails($contactID);
$sendTemplateParams['from'] = $params['from_email_address'];
$sendTemplateParams['toName'] = $this->getContactValue('display_name');
$sendTemplateParams['toEmail'] = $this->_contributorEmail;
- $sendTemplateParams['cc'] = $this->_fromEmails['cc'] ?? NULL;
- $sendTemplateParams['bcc'] = $this->_fromEmails['bcc'] ?? NULL;
+ $sendTemplateParams['cc'] = $fromEmails['cc'] ?? NULL;
+ $sendTemplateParams['bcc'] = $fromEmails['bcc'] ?? NULL;
}
//send email with pdf invoice