applied Patch #101198 There was an inconsistancy, where a color was hardcoded, and...
[squirrelmail.git] / functions / imap_mailbox.php
index ee858ed5d9fdf8bd11387ee4dccd9bb1beda7a56..422638ed3193150b8a06adb94ac9cfce9ade72ad 100755 (executable)
@@ -12,6 +12,7 @@
       sqimap_mailbox_select ($imap_stream, $mailbox);
       fputs ($imap_stream, "a001 EXPUNGE\r\n");
       $read = sqimap_read_data($imap_stream, "a001", true, $response, $message);
+      sqimap_mailbox_close ($imap_stream);
    }
 
 
       }
    }
 
+   /******************************************************************************
+    **  Closes an open mailbox 
+    ******************************************************************************/
+   function sqimap_mailbox_close ($imap_stream) {
+      fputs ($imap_stream, "a001 CLOSE\r\n");
+      $tmp = sqimap_read_data($imap_stream, "a001", false, $response, $message);
+   }
 
-   
    /******************************************************************************
     **  Selects a mailbox
     ******************************************************************************/