Comments (5)
Someone here ? Where is the creator ?
from imap.
@Ashwar the same problem, but I have to upset you: there is not library problem, there is problem of imap server which returns Unknown: Unknown search criterion: OR
.
So I had to do something like 'scenarios', because I work with many different imap servers, each of them supports different scenarios. %)
from imap.
Unfortunately we are unable to get OR
condition working on our test platform with Dovecot. I've tried also on Outlook.com IMAP services, and the result is the same.
The behaviour has been documented in #198 thank you for the feedback.
If you ever get OR
condition working, ping me 👍
from imap.
I'm facing this problem right now, this library is coded based on IMAP4 library version of "OR + $KEYWORD" . The IMAP4 is not supported with imap_search function from PHP.
So the problem is not your dovecot, is not the exim, is nothing with imap server itself of that whe this library "compile" the string with the query 'FROM [email protected] OR SUBJECT tatatan' it pass this string to imap_search, a php function with an old imap2 library. So There is NO solution until PHP update the IMAP module to make it compatible with IMAP4 standard we are stuck in IMAP2.
This library make a good job the code is correct but the imap library of php is the problem to be more precise imap_search use some sort of "c-client UW" as an API i see some guys trying to update that library but the results are not exposed.
So now WHAT WE CAN DO?.
The only solution i found after hours of search is make 2 or more searchs one with every criteria and concatenate the results in one array
This for SURE! will kill your IMAP server if you have many many clients but anyway is a solution.
you can found more info about this problem in the php doc.
imap_search() only supports IMAP2 search criterias, because the function mail_criteria() (from c-client lib) is used in ext/imap/php_imap.c for parsing the search string.
IMAP2 search criteria is defined in RFC 1176, section "tag SEARCH search_criteria".
until PHP update this we are stuck here.
from imap.
@morpheus747 thank you for the details. I've added a note in the README.md #304
from imap.
Related Issues (20)
- Is there a way to fetch only not replied messages? HOT 4
- Google imap no longer supports username and password authentication. HOT 1
- Oauth2 problem HOT 1
- Supplied resource is not a valid imap resource HOT 1
- Wrong post
- imap_sort(): Argument #3 ($reverse) HOT 1
- mb_convert_encoding(): Illegal character encoding specified HOT 4
- Backporting https://github.com/ddeboer/imap/pull/546 to PHP7.4 HOT 1
- Is there any way to add multiple 'oRcondition' in SearchExpression with From Address HOT 1
- Running into intermittent "Cannot reopen mailbox XYZ" HOT 2
- PHP 8.2 compatibility HOT 2
- Imap Codeigniter 4 HOT 2
- Can't retrieve headers from RFC822-HEADERS subpart HOT 2
- output abort message
- Move message to another account HOT 3
- Crash getting message sequence with error: Mailbox has more messages HOT 3
- $bytes must not be accessed before initialization
- getMailboxes() is trying to open a non-mailbox folder resulting in a "cannot reopen" error. HOT 1
- SCRAM-SHA-1(-PLUS) + SCRAM-SHA-256(-PLUS) + SCRAM-SHA-512(-PLUS) + SCRAM-SHA3-512(-PLUS) supports
- Authentication failed: [E_WARNING] Authentication failed for user "[email protected]": imap_open(): Couldn't open stream {imap.gmail.com:993/ssl} imap_alerts (0): imap_errors (1): - Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Invalid credentials (Failure)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imap.