authPage(); ?> error('Could not send mail to: '.$mail.' | subject: '.$subj); } header('Location: /mail.php'); exit(); } // // Includes // require $VEN_DIR . DIRECTORY_SEPARATOR . 'Mail' . DIRECTORY_SEPARATOR .'Mbox.php'; require $VEN_DIR . DIRECTORY_SEPARATOR . 'Mail' . DIRECTORY_SEPARATOR .'mimeDecode.php'; require $LIB_DIR . DIRECTORY_SEPARATOR . 'Mail.php'; require $LIB_DIR . DIRECTORY_SEPARATOR . 'Sort.php'; // // Setup Sort/Order // // Sort/Order settings $defaultSort = array('sort' => 'date', 'order' => 'DESC'); $allowedSorts = array('date', 'subject', 'x-original-to', 'from'); $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 = ''; $orderFrom = ''; $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 = ' '; } } else if ($sort == 'from') { if ($order == 'ASC') { $orderFrom = ' '; } else { $orderFrom = ' '; } } // // Mbox Reader // $MyMbox = new \devilbox\Mail('/var/mail/devilbox'); // 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); ?>
getHead(true); ?> getNavbar(); ?># | Date | From | To | Subject |
---|---|---|---|---|
headers['date']));?> headers['date']));?> |
headers['from']);?> | headers['x-original-to'];?> | headers['subject'];?> | |