Added tests for sending emails