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

Help needed moving a message "command not permitted with UID" #524

Open
briavers opened this issue Oct 11, 2024 · 0 comments
Open

Help needed moving a message "command not permitted with UID" #524

briavers opened this issue Oct 11, 2024 · 0 comments

Comments

@briavers
Copy link

briavers commented Oct 11, 2024

I'm trying to move a message to a different folder using the following code

   $client = Client::account("default");
        $client->connect();

        /** @var \Webklex\PHPIMAP\Support\FolderCollection $folders */
        $folder = $client->getFolder('INBOX');

        if (empty($folder)) {
            $this->error('Folder not found');
            return 1;
        }
        $query = $folder->query()->since(now()->subDays(1))->limit(1)->get();

        $query->each(function($message) use ($client) {
            dump('before mvoe');
            $message->move('INBOX/Ai-Parse/Legits');
            die();
            CleanInboxJob::dispatch($message);
        });

But receive the following logs, and the message is not moved

"before mvoe" // app/Console/Commands/CleanInbox.php:44
>> TAG11 SELECT "INBOX/Ai-Parse/Legits"
<< * 0 EXISTS
<< * 0 RECENT
<< * OK [UIDVALIDITY 1002634] UIDs are valid for this mailbox
<< * OK [UIDNEXT 236772] next expected UID is 236772
<< * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk)
<< * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded \*)] junk-related flags are not permanent
<< * OK [HIGHESTMODSEQ 1002634] modseq tracked on this mailbox
<< TAG11 OK [READ-WRITE] SELECT completed
>> TAG12 EXAMINE "INBOX/Ai-Parse/Legits"
<< * 0 EXISTS
<< * 0 RECENT
<< * OK [UIDVALIDITY 1002634] UIDs are valid for this mailbox
<< * OK [UIDNEXT 236772] next expected UID is 236772
<< * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk)
<< * OK [PERMANENTFLAGS ()] junk-related flags are not permanent
<< * OK [HIGHESTMODSEQ 1002634] modseq tracked on this mailbox
<< TAG12 OK [READ-ONLY] EXAMINE completed
>> TAG13 LIST "" "*"
<< * LIST (\HasNoChildren \Drafts) "/" "Drafts"
<< * LIST (\HasChildren) "/" "INBOX"
<< * LIST (\HasChildren) "/" "INBOX/Ai-Parse"
<< * LIST (\HasNoChildren) "/" "INBOX/Ai-Parse/Legit"
<< * LIST (\HasNoChildren) "/" "INBOX/Ai-Parse/Legits"
<< * LIST (\HasNoChildren) "/" "INBOX/Ai-Parse/Spam"
<< * LIST (\NoInferiors \Junk) "/" "Junk"
<< * LIST (\HasNoChildren) "/" "Lions"
<< * LIST (\HasChildren) "/" "Mailspring"
<< * LIST (\HasNoChildren) "/" "Mailspring/Snoozed"
<< * LIST (\HasNoChildren \Sent) "/" "Sent"
<< * LIST (\HasNoChildren \Trash) "/" "Trash"
<< TAG13 OK LIST completed
>> TAG14 SELECT "INBOX"
<< * 42858 EXISTS
<< * 0 RECENT
<< * OK [UNSEEN 9998] mailbox contains unseen messages
<< * OK [UIDVALIDITY 1] UIDs are valid for this mailbox
<< * OK [UIDNEXT 236769] next expected UID is 236769
<< * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk $MailFlagBit0)
<< * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $MailFlagBit0 \*)] junk-related flags are not permanent
<< * OK [HIGHESTMODSEQ 1002654] modseq tracked on this mailbox
<< TAG14 OK [READ-WRITE] SELECT completed
>> TAG15 UID MOVE 236730 "INBOX/Ai-Parse/Legits"
<< TAG15 BAD parse error: command not permitted with UID
>> TAG16 LOGOUT
<< * BYE zcsnocm105.telenet-ops.be Zimbra IMAP4rev1 server closing connection
<< TAG16 OK LOGOUT completed

command not permitted with UID=> is this an issue in the package, my code, or my email provider?, I'm using IMAP (not pop or other ones)

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

No branches or pull requests

1 participant