added mailer api generation and hooked up some more routes