create and modify email templates function