X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fimap.php;h=e0feecfd189d687d8dee43620f4cb10a13c13c0f;hp=090f078e7b4c5190c1fc889024171367a8143bf2;hb=de80e95e61d4a179a0d41ac4512c83818f3243ef;hpb=ed4332d1ce7dc32d4af42d75c1d52d3d89730b2f;ds=sidebyside diff --git a/functions/imap.php b/functions/imap.php index 090f078e..e0feecfd 100644 --- a/functions/imap.php +++ b/functions/imap.php @@ -82,4 +82,16 @@ } } + function deleteMessages($imapConnection, $a, $b, $numMessages, $trash_folder, $move_to_trash, $auto_expunge, $mailbox) { + /** check if they would like to move it to the trash folder or not */ + if ($move_to_trash == true) { + $success = copyMessages($imapConnection, $a, $b, $trash_folder); + if ($success == true) + setMessageFlag($imapConnection, $a, $b, "Deleted"); + } else { + setMessageFlag($imapConnection, $a, $b, "Deleted"); + } + if ($auto_expunge == true) + expungeBox($imapConnection, $mailbox, $numMessages); + } ?>