add tests for mailer