added mailer and completed datatables functionality