Skip to content
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

Searching by Message-ID header - MS Exchange 2010 #16

Closed
mattk- opened this issue Feb 12, 2014 · 1 comment
Closed

Searching by Message-ID header - MS Exchange 2010 #16

mattk- opened this issue Feb 12, 2014 · 1 comment

Comments

@mattk-
Copy link

mattk- commented Feb 12, 2014

Searching by header against Microsoft Exchange (2010) fails.

Apparently Exchange does not support UTF8 (http://lists.horde.org/archives/bugs/Week-of-Mon-20110815/057209.html)

Example:

var searchCondition = SearchQuery.Header("Message-Id", messageId);
var ids = _client.Inbox.Search(searchCondition, _cancellationToken);

ImapFolder.Search adds CHARSET UTF-8:

if (args.Count > 0)
    command += "CHARSET UTF-8 ";

From the log:

C: A00000006 UID SEARCH CHARSET UTF-8 HEADER Message-Id <37cde6de-915e-4259-b8af-cff8381daae4@journal.report.generator>
S: A00000006 NO [BADCHARSET (US-ASCII)] The specified charset is not supported.
jstedfast added a commit that referenced this issue Feb 12, 2014
…non-ASCII

Apparently Exchange does not support UTF-8 text searches.

Fixes issue #16
@jstedfast
Copy link
Owner

Thanks for reporting this!

I have to agree with the poster of that email in the link you gave, it's 2014 and Exchange still doesn't implement UTF-8? :-(

I fixed this in git master by using the US-ASCII charset unless the search text actually contains non-ASCII characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants