add new email template component to handle different template systems. fix validation issues in api. change email body variable management in email templates module