Commit 8033bb49 authored by Stan Dragnev's avatar Stan Dragnev

Fixes the from address on automated emails to use default mailing email...

Fixes the from address on automated emails to use default mailing email address rather than that of the recipient.
parent 90b6d4a9
......@@ -326,7 +326,12 @@ WHERE civicrm_contact.id = $id ";
),
'PDFFilename' => '',
);
$sendTemplateParams['from'] = $email;
$defaultAddress = CRM_Core_OptionGroup::values('from_email_address', NULL, NULL, NULL, ' AND is_default = 1');
foreach ($defaultAddress as $id => $value) {
$sendTemplateParams['from'] = $value;
}
$sendTemplateParams['toName'] = $displayName;
$sendTemplateParams['toEmail'] = $email;
$sendTemplateParams['autoSubmitted'] = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment