added testing to sending emails