php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

Deleting multiple messages in the Trash folder does not work correctly

Open AnastasiaDolgopolova opened this issue 4 years ago • 2 comments

Describe the bug When I pass the uid array and run it through foreach to move to another folder it works fine. Снимок1

But when I pass the uid array and pass it through foreach to delete messages, then all messages in the Trash folder are deleted, not just those that were passed in the array!? image

(At the same time, deleting an array of messages in the Spam, Drafts folders destroyed () method works / or if you transfer only one message to the Trash folder, then the destroyed () method works well)

How can i work with delete () of multiple messages in Trash folder?

I get: 500 (Internal Server Error) image

"php": ">=8.0", "laravel/framework": "^8.0", "webklex/php-imap": "^2.5"

AnastasiaDolgopolova avatar Nov 23 '21 11:11 AnastasiaDolgopolova

Hi! How can i work with delete() of multiple messages in Trash folder?

AnastasiaDolgopolova avatar Dec 07 '21 08:12 AnastasiaDolgopolova

Hi @AnastasiaDolgopolova , please update to the latest release and try again. There have been a ton of improvements and a vulnerability got fixed.

Besides this, try to set $expunge to false - otherwise your message numbers or uids will have changed and perhaps invalidate the next message. In general I recommend to "expunge" (commit your changes) not as long as you're still planning to use previously fetched messages.

Once again, thanks for taking the time and effort to make this library better! If you have any more questions or need further assistance, feel free to let me know.

Best regards and happy coding!

Webklex avatar Jun 23 '23 23:06 Webklex