Added support for email templates