Fix mailer code