using template in emails