-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buggy imap_search/encoding on Microsoft Exchange/Office365 #128
Comments
I have the same issue, do you know what type of encoding to use with Exchange and Office 365? |
Same issue here. @barbushin is this onto a |
Sorry guys, I'm just too busy in last few months. It will be great if somebody can find solution and send me Pull request. Cheers! |
If someone is interested in this kind of situation - I will tackle it, if I ever find time, later - I've tried to understood what's goes on here as PHP itself returns a BTW I've played around with python and what I got is
|
Any news? I have same problem too |
@a7lan Unfortunately, no. |
@barbushin You can take a look at here. Maybe we can do what they said: "When searching fall back to US-ASCII if BADCHARSET is received." |
@littleylv You are right the US-ASCII encoding is the solutions for that. Every one who faces this problem can try to initialize the mailbox with US-ASCII encoding. |
With that solution a search in the mailbox like that |
US-ASCII leads to the issue with gmail accounts:
|
I had the same issue while converting iso-8859-1 to UTF-8 and added following lines and it works fine for me now. |
See fixes: Problem with serverEncoding #101 🔗 |
This is an issue on Exchange servers and not related to this library. However, we're still checking, if we can implement a workaround to get it somehow working. See #306. |
Hi
I have found some kind of issue. Tested on Office365 and local Microsoft Exchange server.
If serverEncoding is sent as an empty string when creating the object, the imap_search would fail and return empty array. The string would look like this: imap_search(Resource id #72, FROM "mail@address.com", SE_UID, ); - with a comma and no encoding at the end.
In some weird way, the imap_search criteria "ALL" seems to work in this case, but no other criteria-parameters.
Also if I don't send any encoding parameter at all, UTF-8 would be set as default. I don't know why or what kind of encoding is used by Microsoft - but UTF-8 has the same problem, criteria "ALL" work, but no other criterias.
If I just remove ", $this->serverEncoding" on line 174, all imap_search criterias works.
Suggested solution: Don't set any server encoding as default and/or check if server-encoding parameter is empty.
The text was updated successfully, but these errors were encountered: