CRM-14830 - Email tpl cleanup and removed unused function