updating send_email
added test cases