few fixes for the mailer class