Added patch from Jan
[squirrelmail.git] / functions / mailbox_display.php
index 87074a06d388b1e58d4228144824e9eb651d0902..e4d3c6816d33eb1502c9d31f175e74fec830a8ab 100644 (file)
       global $msgs, $msort;
                global $sent_folder;
       global $message_highlight_list;
+      global $auto_expunge;
+
+      if ($auto_expunge) {
+         sqimap_mailbox_expunge($imapConnection, $mailbox);
+         sqimap_mailbox_select($imapConnection, $mailbox);
+      }
 
       if (!$use_cache) {
          if ($numMessages >= 1) {