2 include("../config/config.php");
3 include("../functions/mailbox.php");
4 include("../functions/strings.php");
5 include("../functions/page_header.php");
6 include("../functions/display_messages.php");
8 $imapConnection = loginToImapServer($username, $key);
10 // switch to the mailbox, and get the number of messages in it.
11 selectMailbox($imapConnection, $mailbox, $numMessages, $imapServerAddress);
13 // Marks the selected messages ad 'Deleted'
17 while ($j < count($msg)) {
19 /** check if they would like to move it to the trash folder or not */
20 if ($move_to_trash == true) {
21 $success = copyMessages($imapConnection, $msg[$i], $msg[$i], $trash_folder);
23 setMessageFlag($imapConnection, $msg[$i], $msg[$i], "Deleted");
25 setMessageFlag($imapConnection, $msg[$i], "Deleted");
32 if ($auto_expunge == true)
33 expungeBox($imapConnection, $mailbox, $numMessages);
35 // Log out this session
36 fputs($imapConnection, "1 logout");
38 echo "<HTML><BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFFF\" LINK=\"#0000EE\" VLINK=\"#0000EE\" ALINK=\"#0000EE\">";
39 displayPageHeader($mailbox);
41 messages_deleted_message($mailbox, $sort, $startMessage);