go-imap icon indicating copy to clipboard operation
go-imap copied to clipboard

Removed default charset of UTF-8. User may specify their own charset

Open glennzw opened this issue 6 years ago • 0 comments

This IMAP library fails for Microsoft Exchange servers because of the hardcoded UTF-8 charset:

imap: unexpected completion status (\"NHGVU5 NO [BADCHARSET (US-ASCII)] The specified charset is not supported.\")"

I've removed the default charset, and users may rather specify their own charset in the []imap.Field. e.g:

specs := []imap.Field{"CHARSET", "US-ASCII", "UNSEEN"}

I tested with a few different IMAP servers and all were happy with no charset set.

glennzw avatar Feb 13 '20 17:02 glennzw