Refactored the Mailer