8bc2ff5aa91340893f7ac99460a3d6971de108e0
2 include("../config/config.php");
3 include("../functions/strings.php");
4 include("../functions/page_header.php");
5 include("../functions/imap.php");
6 include("../functions/mailbox.php");
8 $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
10 // switch to the mailbox, and get the number of messages in it.
11 selectMailbox($imapConnection, $mailbox, $numMessages);
13 $folder = getFolderNameMinusINBOX($mailbox);
14 $trash = getFolderNameMinusINBOX($trash_folder);
16 /** check if they would like to move it to the trash folder or not */
17 if ($move_to_trash == true) {
18 createFolder($imapConnection, "user.$username.$trash.$folder");
19 echo "CREATING FOLDER: user.$username.$trash.$folder<BR>";
21 $success = copyMessages($imapConnection, 1, $numMessages, $trash_folder);
26 removeFolder($imapConnection, "user.$username.$folder");
28 removeFolder($imapConnection, "user.$username.$folder");
31 // Log out this session
32 fputs($imapConnection, "1 logout");
34 echo "<BR><BR><A HREF=\"folders.php\">Return</A>";