I'm using this extension https://www.php-imap.com/api/message and I'd like to get all replies for a message but I get an error:
Call to a member function query() on null vendor/webklex/php-imap/src/Message.php#821
My code is:
$client->connect();
$folder = $client->getFolder($folder->name);
$message = $folder->query()->getMessageByMsgn($letter->msgn);
var_dump($message->thread($sent_folder = null)); // here it crushes
Everything else is working fine, the problem is only with getting replies. Could someone help me please?
EDIT: Maybe there is another way to get replies for message using laravel imap? Even if I use reference, the message body itself may contain some replies too which can't be parsed normally..