send email moved to controller