fixes to mailer