Hi!
@yiioverflow
In Microsoft Exchange 2016, there are some features to be considered.
The fact is that there is no way to read only incoming messages(UNSEEN) if UTF-8 encoding is specified. To search, you must use US-ASCII encoding. But, in this case, the answer will also be in this encoding. This is a bad decision, because this encoding does not contain national symbols. Therefore, you must use two different encodings. One to search, and one to return the result.
Hi! @yiioverflow In Microsoft Exchange 2016, there are some features to be considered. The fact is that there is no way to read only incoming messages(UNSEEN) if UTF-8 encoding is specified. To search, you must use US-ASCII encoding. But, in this case, the answer will also be in this encoding. This is a bad decision, because this encoding does not contain national symbols. Therefore, you must use two different encodings. One to search, and one to return the result.
https://www.php.net/manual/en/function.imap-search.php
I'm currently using a direct encoding override. I think the best solution is to configure additional encoding for search.