/******************************************************************************
** Expunges a mailbox
******************************************************************************/
- function sqimap_mailbox_expunge ($imap_stream, $mailbox) {
+ function sqimap_mailbox_expunge ($imap_stream, $mailbox,$handle_errors) {
sqimap_mailbox_select ($imap_stream, $mailbox);
fputs ($imap_stream, "a001 EXPUNGE\r\n");
- $read = sqimap_read_data($imap_stream, "a001", true, $response, $message);
+ $read = sqimap_read_data($imap_stream, "a001", $handle_errors, $response, $message);
sqimap_mailbox_close ($imap_stream);
}
}
if ($auto_expunge) {
fputs ($imap_stream, "a001 EXPUNGE\r\n");
- $tmp = sqimap_read_data($imap_stream, "a001", true, $a, $b);
+ $tmp = sqimap_read_data($imap_stream, "a001", false, $a, $b);
}
}
global $message_highlight_list;
global $auto_expunge;
- sqimap_mailbox_expunge($imapConnection, $mailbox);
+ sqimap_mailbox_expunge($imapConnection, $mailbox, false);
sqimap_mailbox_select($imapConnection, $mailbox);
if (!$use_cache) {
if ($numMessages > 0) {
sqimap_mailbox_select($imap_stream, $trash_folder);
sqimap_messages_flag ($imap_stream, 1, $numMessages, "Deleted");
- sqimap_mailbox_expunge($imap_stream, $trash_folder);
+ sqimap_mailbox_expunge($imap_stream, $trash_folder, true);
sqimap_mailbox_close($imap_stream);
}
}
if ($numMessages > 0) {
sqimap_mailbox_select($imap_stream, $trash_folder);
sqimap_messages_flag ($imap_stream, 1, $numMessages, "Deleted");
- sqimap_mailbox_expunge($imap_stream, $trash_folder);
+ sqimap_mailbox_expunge($imap_stream, $trash_folder, true);
sqimap_mailbox_close($imap_stream);
}
}
sqimap_messages_delete($imapConnection, $message, $message, $mailbox);
if ($auto_expunge)
- sqimap_mailbox_expunge($imapConnection, $mailbox);
+ sqimap_mailbox_expunge($imapConnection, $mailbox, true);
$location = get_location();
if ($where && $what)
// expunge-on-demand if user isn't using move_to_trash or auto_expunge
if($expungeButton) {
- sqimap_mailbox_expunge($imapConnection, $mailbox);
+ sqimap_mailbox_expunge($imapConnection, $mailbox, true);
$location = get_location();
if ($where && $what)
header ("Location: $location/search.php?mailbox=".urlencode($mailbox)."&what=".urlencode($what)."&where=".urlencode($where));
$i++;
}
if ($auto_expunge) {
- sqimap_mailbox_expunge($imapConnection, $mailbox);
+ sqimap_mailbox_expunge($imapConnection, $mailbox, true);
}
$location = get_location();
if ($where && $what)
$i++;
}
if ($auto_expunge == true)
- sqimap_mailbox_expunge($imapConnection, $mailbox);
+ sqimap_mailbox_expunge($imapConnection, $mailbox, true);
$location = get_location();
if ($where && $what)