Add tests for mailer