build fixes for mailer