Removed object to array conversion in the mailer class, added a data var to the class