add unittest for mailer