Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Imap.php: Delete-Flag work's, but can't remove mail from server/mailbox #2

Closed
wants to merge 1 commit into from

Conversation

DerDu
Copy link

@DerDu DerDu commented Jan 28, 2014

You need to send "CLOSE" before "LOGOUT" to remove delete-flagged messages from active message box - or: provide (at least) a function to do so manually

Fix (partly) issue #1

You need to send "CLOSE" before "LOGOUT" to remove delete-flagged messages from active message box - or: provide (at least) a function to do so manually
Fix for issue Eden-PHP#1
@DerDu
Copy link
Author

DerDu commented Jan 28, 2014

http://tools.ietf.org/html/rfc3501#section-6.4.2

6.4.2. CLOSE Command

Arguments: none

Responses: no specific responses for this command

Result: OK - close completed, now in authenticated state
BAD - command unknown or arguments invalid

  The CLOSE command permanently removes all messages that have the
  \Deleted flag set from the currently selected mailbox, and returns
  to the authenticated state from the 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 if a mailbox is selected, a SELECT, EXAMINE, or LOGOUT
  command MAY be issued without previously issuing a CLOSE command.
  The SELECT, EXAMINE, and LOGOUT commands implicitly close the
  currently selected mailbox without doing an expunge.  However,
  when many messages are deleted, a CLOSE-LOGOUT or CLOSE-SELECT
  sequence is considerably faster than an EXPUNGE-LOGOUT or
  EXPUNGE-SELECT because no untagged EXPUNGE responses (which the
  client would probably ignore) are sent.

Example: C: A341 CLOSE
S: A341 OK CLOSE completed

@ghost
Copy link

ghost commented Apr 19, 2016

Your research just saved my life there! Thanks a lot and thanks for the provided code!

@cblanquera cblanquera closed this Sep 2, 2016
@DerDu DerDu mentioned this pull request Mar 22, 2018
@cblanquera cblanquera reopened this Mar 23, 2018
@cblanquera cblanquera closed this Mar 23, 2018
cblanquera pushed a commit that referenced this pull request Mar 23, 2018
by @DerDu . I couldn't accept the PR #2 because of conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants