'date', 'order' => 'DESC'); $allowedSorts = array('date', 'subject', 'x-original-to'); $allowedOrders = array('ASC', 'DESC'); $GET_sortKeys = array('sort' => 'sort', 'order' => 'order'); // Get sort/order $MySort = new \devilbox\Sort($defaultSort, $allowedSorts, $allowedOrders, $GET_sortKeys); $sort = $MySort->getSort(); $order = $MySort->getOrder(); // Evaluate Sorters/Orderers $orderDate = ''; $orderTo = ''; $orderSubj = ''; if ($sort == 'date') { if ($order == 'ASC') { $orderDate = ' '; } else { $orderDate = ' '; } } else if ($sort == 'subject') { if ($order == 'ASC') { $orderSubj = ' '; } else { $orderSubj = ' '; } } else if ($sort == 'x-original-to') { if ($order == 'ASC') { $orderTo = ' '; } else { $orderTo = ' '; } } // // Mbox Reader // $MyMbox = new \devilbox\Mail('/var/mail/mailtrap'); // If default sort is on, use NULL, so we do not have to sort the mails after retrieval, // because they are being read in the default sort/order anyway $sortOrderArr = $MySort->isDefault($sort, $order) ? null : array($sort => $order); $messages = $MyMbox->get($sortOrderArr); ?>

Mail



Send test Email




Received Emails


# Date To Subject
headers['date']));?>
headers['date']));?>
headers['x-original-to'];?> headers['subject'];?>