remove mailer from outer app, add test env to tests