new function , update email template