From 603e8fae8e30bbf74d68f013d4cdc6685ba490f5 Mon Sep 17 00:00:00 2001 From: Matthieu Rakotojaona Date: Thu, 1 Feb 2024 19:22:31 +0100 Subject: [PATCH] fetch: ensure field names are Atoms --- imapclient/fetch.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imapclient/fetch.go b/imapclient/fetch.go index cdd4dc3d..0d0d4725 100644 --- a/imapclient/fetch.go +++ b/imapclient/fetch.go @@ -101,7 +101,8 @@ func writeFetchItemBodySection(enc *imapwire.Encoder, item *imap.FetchItemBodySe if len(headerList) > 0 { enc.SP().List(len(headerList), func(i int) { - enc.String(headerList[i]) + // This should be a string, but some servers don't recognize that + enc.Atom(headerList[i]) }) } }