go-imap
go-imap copied to clipboard
Removed default charset of UTF-8. User may specify their own charset
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.