I am displaying new email with IMAP
, and everything looks fine, except for one message subject shows as:
=?utf-8?Q?Subject?=
How can I fix it?
I am displaying new email with IMAP
, and everything looks fine, except for one message subject shows as:
=?utf-8?Q?Subject?=
How can I fix it?
Try Imbox
Because
imaplib
is a very excessive low level library and returns results which are hard to work withInstallation
pip install imbox
Usage
This is a MIME encoded-word. You can parse it with
email.header
:In MIME terminology, those encoded chunks are called encoded-words. You can decode them like this:
Check out the docs for
email.Header
for more details.