login first."; exit; } if(!isset($username) || !isset($key)) { echo "You need a valid user and password to access this page!"; exit; } ?> "; exit; } // switch to the mailbox, and get the number of messages in it. selectMailbox($imapConnection, $mailbox, $numMessages); // Display the header at the top of the page displayPageHeader($mailbox); // Get the list of messages for this mailbox showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort); // close the connection fputs($imapConnection, "1 logout\n"); fclose($imapConnection); ?>