You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing some Googling it seems like it's a Microsoft Exchange issue. The BADCHARSET response-code provides a list of supported charsets, not the charset that is invalid. The charset that is invalid is the charset used in the UIDSearch() command (which I assume is UTF-8).
Given that the github.com/mxk/go-imap/imap project hasn't been updated in over 5 years I'm guessing something 'modern' might be breaking things. Digging into this project I find the following code:
// UIDSearch is identical to Search, but the numbers returned in the response
// are unique identifiers instead of message sequence numbers.
func (c *Client) UIDSearch(spec ...Field) (cmd *Command, err error) {
return c.Send("UID SEARCH", append([]Field{"CHARSET", "UTF-8"}, spec...)...)
}
When trying to retrieve unread emails from Microsoft Exchange servers the following error is encountered:
uid search failed: imap: unexpected completion status ("RXUGA5 NO [BADCHARSET (US-ASCII)] The specified charset is not supported.")
Failure occurs here: https://github.com/jprobinson/eazye/blob/master/eazye.go#L337
Doing some Googling it seems like it's a Microsoft Exchange issue. The BADCHARSET response-code provides a list of supported charsets, not the charset that is invalid. The charset that is invalid is the charset used in the UIDSearch() command (which I assume is UTF-8).
Given that the
github.com/mxk/go-imap/imap
project hasn't been updated in over 5 years I'm guessing something 'modern' might be breaking things. Digging into this project I find the following code:https://github.com/mxk/go-imap/blob/master/imap/imap.go#L377
The CHARSET here being specified as UTF-8. I changed this is "US-ASCII" and I am able to login to Outlook servers.
EDIT: I see this was raised some years ago https://github.com//issues/3
The text was updated successfully, but these errors were encountered: