added email template to views, and used it