Added tests for sending email.