Added mailer function as helper class