Fixes to mailer