Commit d6b04686 authored by Stan Dragnev's avatar Stan Dragnev Committed by Monish Deb

refs #202: fix for multiple addresses if no default set

parent 6c079c9d
......@@ -336,11 +336,12 @@ WHERE civicrm_contact.id = $id ";
if (!isset($defaultAddress) || $defaultAddress == '') {
$defaultAddress = CRM_Core_OptionGroup::values('from_email_address', NULL, NULL, NULL, ' AND is_default = 1');
}
foreach ($defaultAddress as $id => $value) {
$sendTemplateParams['from'] = $value;
foreach ($defaultAddress as $id => $value) {
$sendTemplateParams['from'] = $value;
}
} else {
$sendTemplateParams['from'] = $defaultAddress;
}
$sendTemplateParams['toName'] = $displayName;
......
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