mailer bug fixes