diff --git a/.devilbox/www/htdocs/_iframe_mail.php b/.devilbox/www/htdocs/_iframe_mail.php new file mode 100644 index 000000000..5a70b09bf --- /dev/null +++ b/.devilbox/www/htdocs/_iframe_mail.php @@ -0,0 +1,46 @@ + +authPage(); ?> + '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(); + +$body = null; +if (isset($_GET['mail-id']) && is_numeric($_GET['mail-id'])) { + $messageNumber = $_GET['mail-id']; + $MyMbox = new \devilbox\Mail('/var/mail/devilbox'); + $message = $MyMbox->getMessage($messageNumber-1); + $structure = $message['decoded']; + + if (isset($structure->body)) { + $body = $structure->body; + } + elseif(isset($structure->parts[1]->body)) { + $body = $structure->parts[1]->body; + } + elseif(isset($structure->parts[0]->body)) { + $body = $structure->parts[0]->body; + } +} +?> +