Skip to content

I use move() for move message to another folder, but not working. #123

@nhatlinhle

Description

@nhatlinhle

I want to move message from folder INBOX to another folder, i am try follow code:

$client->connect();
//Get all Mailboxes
/** @var \Webklex\IMAP\Support\FolderCollection $folders */
$folders = $client->getFolder('INBOX');
/** @var \Webklex\IMAP\Message $detail */
$detail = $folders->messages()->getMessageByUid($uid = $id);
// $detail->delete($expunge = true);
$message = $detail->move('TRASH');
 if ($message == true) {
      dd('Message has ben moved');
  } else {
      dd('False');
  }

but always return false.
I have created folder TRASH, and i have collection folder in image:
image

I am tried copy() is working, but move() is not work.
Please help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions