The IMAP server replied to the 'CLOSE' command with a 'NO' response


I’m getting this message while using Get IMAP Messages:

The IMAP server replied to the ‘CLOSE’ command with a ‘NO’ response: CLOSE Document has been deleted

May I ask what does this mean?

CLOSE Command

Arguments: none

Data: no specific data for this command

Result: OK - close completed, now in authenticated state
NO - close failure: no mailbox selected
BAD - command unknown or arguments invalid

  The CLOSE command permanently removes from the currently selected
  mailbox all messages that have the \Deleted flag set, and returns
  to authenticated state from selected state.  No untagged EXPUNGE
  responses are sent.

  No messages are removed, and no error is given, if the mailbox is
  selected by an EXAMINE command or is otherwise selected read-only.

  Even when a mailbox is selected, it is not required to send a
  CLOSE command before a SELECT, EXAMINE, or LOGOUT command.  The
  SELECT, EXAMINE, and LOGOUT commands implicitly close the
  currently selected mailbox without doing an expunge.

I’m sorry but I am having trouble understanding this.
May you please elaborate on the root cause?

Does anyone has solution for this?

I am getting same error.
My scenario:
I am iterating over the list of mails with for loop.
For the last mail in iteration I get this message