Closed Nayazkaya closed 1 year ago
Dear all,
I need to move (or copy & delete) messages from an account to another one. I've tried this :
$connection = $server->authenticate($Mail1, $Pass1); $connection1 = $server->authenticate('$Mail2',$Pass2'); $mailbox = $connection->getMailbox('INBOX'); $mailbox1 = $connection1->getMailbox('INBOX'); $messages = $mailbox->getMessages(); foreach ($messages as $message ) { if ($message->getSubject() =="condition") { $message->move($mailbox1); } }
but i doesn't work. Is it possible to do this ?
Is it possible to do this ?
No
You can use a tool like https://imapsync.lamiral.info/ for this. With for example exec() you can start this with PHP.
exec()
OK thanks
Dear all,
I need to move (or copy & delete) messages from an account to another one. I've tried this :
but i doesn't work. Is it possible to do this ?