Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Duplicate
-
Affects Version/s: 4.2.4
-
Fix Version/s: 4.3.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
In the file CRM/Activity/BAO/Activity.php the function "sendEmail" does some checking to determine if tokens are in use or not. But it only checks for the use of core mail tokens, such as "contact.first_name" . So if in email is using only custom mail merge tokens defined by a hook, then none of those tokens get filled in.
To fix the problem I changed the code around line 1334:
Original section:
if (!empty($returnProperties))
New section of code, working:
// if (!empty($returnProperties))
{ list($details) = CRM_Utils_Token::getTokenDetails($contactIds, $returnProperties, NULL, NULL, FALSE, $messageToken, 'CRM_Activity_BAO_Activity' ); // }This solution assumes tokens are always in use. I am not sure of any side-affects of this fix.