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

Implement copyMove() function #494

Closed
tomsommer opened this issue Apr 2, 2021 · 4 comments · Fixed by #495
Closed

Implement copyMove() function #494

tomsommer opened this issue Apr 2, 2021 · 4 comments · Fixed by #495

Comments

@tomsommer
Copy link
Contributor

tomsommer commented Apr 2, 2021

imap_mail_move() doesn't always work moving messages (Exchange has problems with it, for one), it would be nice with a copyMove() function that implements imap_mail_copy() with the \CP_MOVE option

Workaround currently looks like this:
imap_mail_copy($imapConnection->getResource()->getStream(), (string) $_message->getNumber(), $imapMailbox>getEncodedName(), \CP_UID | \CP_MOVE);

@Slamdunk
Copy link
Collaborator

Slamdunk commented Apr 2, 2021

Do you expunge the connection after moving the message?

@tomsommer
Copy link
Contributor Author

Yes

@tomsommer
Copy link
Contributor Author

tomsommer commented Apr 2, 2021

I moved from https://github.com/tedious/Fetch/blob/master/src/Fetch/Message.php#L788 where move worked fine, because it uses imap_mail_copy with \CP_MOVE

@Slamdunk
Copy link
Collaborator

Slamdunk commented Apr 2, 2021

Released in v1.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants