Fix tests. Add more mailer tests