improve tha mailer class