add send email confirmation function