Added send email function to test