From 35ad56e460d4c4f8d0ac03d4f1734ccf3b2671f2 Mon Sep 17 00:00:00 2001 From: Glenn Wilkinson Date: Thu, 13 Feb 2020 17:07:11 +0000 Subject: [PATCH] Removed default charset of UTF-8. User may specify their own charset --- imap/imap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imap/imap.go b/imap/imap.go index 20b170a..f28e563 100644 --- a/imap/imap.go +++ b/imap/imap.go @@ -350,7 +350,7 @@ func (c *Client) Expunge(uids *SeqSet) (cmd *Command, err error) { // is the caller's responsibility to quote strings when necessary. All strings // must use UTF-8 encoding. func (c *Client) Search(spec ...Field) (cmd *Command, err error) { - return c.Send("SEARCH", append([]Field{"CHARSET", "UTF-8"}, spec...)...) + return c.Send("SEARCH", spec...) } // Fetch retrieves data associated with the specified message(s) in the mailbox. @@ -374,7 +374,7 @@ func (c *Client) Copy(seq *SeqSet, mbox string) (cmd *Command, err error) { // 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...)...) + return c.Send("UID SEARCH", spec...) } // UIDFetch is identical to Fetch, but the seq argument is interpreted as