fixed insert tag problem in the email template

fixed the problem to replace insert tags in the variables of the email template