add mailer and update api status codes