-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
With outlook mail servers, the charset shouldn't be send with the imap_search #100
Comments
Hi @tayfunkayahan , So setting Folder::searchMessages(array $where, $fetch_options = null, $fetch_body = true, NULL); I wouldn't like the idea to perform an unnecessary (unless I' using a microsoft domain) array lookup every time I call the search method. I think it's fair to implement the logic outside if necessary :) Instead I would like to add it to the known issue section and link it to this issue as well as the future wiki. If I'm wrong and the majority is actually using microsoft related email addresses the Best regards |
Hi @Webklex, Thanks for your response. I know, the PHP documentation says that it is Did you actually try it with a Microsoft domain? Because I also tried on different environments and created different new accounts. For now it's not a that huge of problem, but that's because I just kept the 4rd argument empty in True that, an extra array lookup is actually unnecessary in the library itself but if this problem really occurs with everyone with a microsoft account than it would be handy, or maybe like you said put it somewhere in the known issues so people know about this :-) UPDATE: UPDATE 2: |
@tayfunkayahan please update to the latest version. You can now set the charset to if($this->getCharset() === null){
$available_messages = imap_search($this->getClient()->getConnection(), $this->getRawQuery(), SE_UID);
}else{
$available_messages = imap_search($this->getClient()->getConnection(), $this->getRawQuery(), SE_UID, $this->getCharset());
} |
@Webklex thnx for the update! should work perfectly now! |
We are using the following code:
The following error uccurs when trying to fetch messages from outlook.office365.com server: It looks like we need somehow to set charset to |
Here is the solution: freescout-help-desk/freescout#176 (comment) |
Hi @freescout-helpdesk , /** @var \Webklex\IMAP\Folder $folder */
/** @var \Webklex\IMAP\Message $message */
$message = $folder->query(null)->get()->first();
Best regards |
Hi Webklex,
Firstly, thanks for the great package!
I encountered some problems today with the package, which is actually an edge case..
With every mayor mail server besides Microsofts (outlook) imap servers, the charset shouldn't be send with the imap search. For some reason, if we send the default UTF-8 charset with the
imap_search
, every search criteria besidesALL
doesn't work.. If I leave it blank, every search criteria works :)For myself I added a check if it is a microsoft account (@outlook.com / @hotmail.com), than the charset shouldn't be given to the
imap_search
, otherwise I am using theUTF-8
charset. If I didn't do this, I couldn't use search criteria likeUNSEEN
,SEEN
, etc :)For myself I did something like this;
Define somewhere logical (for me I implemented in the Folder class) an
CONST
with common microsoft domains;In the
searchMessages
function;I tried it with setting the
$charset = NIL
, but it really shouldn't be passed when doing animap_search
.I'd like to hear from you, if you approve this approach I'll make a PR for you, otherwise I'd like to hear what your approach would be! 👍 :-)
The text was updated successfully, but these errors were encountered: