Ext functions - hdijkema/espocrm-hookedformulas GitHub Wiki
Ext\Htmlize
BODY = Ext\Htmlize(TEMPLATE, ENTITYTYPE, ID)
Htmlizes the template to a body, using the standard EspoCRM Htmlizer for the given EntityType. Look at EspoCRM Mass Mails.
Example:
$contact = Entity\Get('Contact', $contactId); // fetch contact for related contact
$body = configGet('standard-email-for-alert-to-contact'); // fetch template mail
$body = ext\htmlize($body, 'Contact', attr($contact, 'id')); // htmlize it.