made changes to add the ability to customize variables in the email template