Open gmartinez opened 1 year ago
Hi @gmartinez , if the "OR" operation is supported by your mail provider you can use it a few different ways. Here are a few examples:
$messages = $folder->query()->subject("some subject")->orWhere()->to("some@one.tld")->orWhere(function($query){
$query->text("some custom text")->orWhere("from@someone.com");
})->get();
Best regards & happy hacking,
Using orWhere(function... seem to build the query fine, but upon issuing the get() I get an ImapServerErrorException
FYI I am querying gmail, which according to documentation does support OR.
When turning degub the text around the error reads;
<< TAG3 OK [READ-WRITE] INBOX selected. (Success)
TAG4 UID SEARCH TO "one" OR TO "another"
<< TAG4 BAD Could not parse command
Webklex\PHPIMAP\Exceptions\ImapServerErrorException
Any idea ?
Hi there, new to the package here, could not find or infer from documentation so here it goes the question.
How can I search using ORs, trying to query for messages sent to one OR another recipient, trie the following with no luck.
Thanks in advance !