added test to sending emails