Re-inventing the wheel?
Somewhat related to #12 (closed) - what is the idea behind reimplementing template handling and token expansion in civicrm_api3_email_send()
rather than enhancing CRM_Core_BAO_MessageTemplate::sendTemplate()
?
The main addition appears to be that you can specify an activity_id
, contribution_id
and case_id
to enable token replacement for those, but that could be added to sendTemplate()
.
On the other hand, emailapi does not handle attachments, enable passing of template params or call hook_civicrm_alterMailParams
It would seem preferable to put the collective effort into enhancing the core functions rather than partially reimplementing them.