added email template and send email flow