From 5e3fe35753f3f5deb4766caa47e3ccdf82719153 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Fri, 7 Jan 2000 23:15:44 +0000 Subject: [PATCH] added auto expunge git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@137 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- config/config.php | 2 +- functions/imap.php | 3 +++ functions/mailbox.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/config.php b/config/config.php index a18227d9..58b3ebad 100644 --- a/config/config.php +++ b/config/config.php @@ -81,7 +81,7 @@ $default_move_to_trash = true; $trash_folder = "INBOX.Trash"; - $default_auto_expunge = true; + $auto_expunge = true; // Special Folders are folders that can't be manipulated like normal user created // folders can. A couple of examples would be "INBOX.Trash", "INBOX.Drafts". We have diff --git a/functions/imap.php b/functions/imap.php index d700c84e..a1876c77 100644 --- a/functions/imap.php +++ b/functions/imap.php @@ -292,7 +292,10 @@ } else { setMessageFlag($imapConnection, $a, $b, "Deleted"); } + if ($auto_expunge == true) + expungeBox($imapConnection, $mailbox); } + function stripComments($line) { if (strpos($line, ";")) { $line = substr($line, 0, strpos($line, ";")); diff --git a/functions/mailbox.php b/functions/mailbox.php index 1f9a5024..9a498398 100644 --- a/functions/mailbox.php +++ b/functions/mailbox.php @@ -227,6 +227,7 @@ function expungeBox($imapConnection, $mailbox) { selectMailbox($imapConnection, $mailbox, $num); fputs($imapConnection, "1 EXPUNGE\n"); + imapReadData($imapConnection, "1", true, $response, $message); } function getFolderNameMinusINBOX($mailbox, $del) { -- 2.25.1