improve mailer by adding a Mail class