+function sqimap_msgs_list_delete ($imap_stream, $mailbox, $id) {
+ global $move_to_trash, $trash_folder, $uid_support;
+ $msgs_id = sqimap_message_list_squisher($id);
+ if (($move_to_trash == true) && (sqimap_mailbox_exists($imap_stream, $trash_folder) && ($mailbox != $trash_folder))) {
+ $read = sqimap_run_command ($imap_stream, "COPY $msgs_id \"$trash_folder\"", true, $response, $message, $uid_support);
+ }
+ $read = sqimap_run_command ($imap_stream, "STORE $msgs_id +FLAGS (\\Deleted)", true, $response, $message, $uid_support);
+}
+
+