'3D' is the hexadecimal encoding of '='. So the problem is that you aren't properly decoding the email, which can be done using python's email
module and message.get_payload(decode=True)
.
Here's a short snippet:
import imaplib, email
imap_server = "imap.aol.com" #maybe this would be imap.gmail.com for gmail?
conn = imaplib.IMAP4_SSL(imap_server, 993)
conn.login(username, password)
conn.select()
resp, data = conn.uid('FETCH', '1:*' , '(RFC822)')
raw = data[0][1].strip()
message = email.message_from_string(raw)
decoded = message.get_payload(decode=True) #this will be the decoded body of the email message