Python Imap_工具获取邮件错误消息

Python Imap_工具获取邮件错误消息,python,Python,我无法得到消息 msg.text [当我的邮件发送成功时] 这封信不起作用:帕帕拉bilgi@papara.com from: Papara bilgi@papara.com recipient: ***** date: 14 Nov 2020 15: 33 subject: 0.10 TL came to your account posted by: gmail.com signed: papara.com security: standard encryption (TLS) learn

我无法得到消息 msg.text [当我的邮件发送成功时]

这封信不起作用:帕帕拉bilgi@papara.com

from: Papara bilgi@papara.com
recipient: *****
date: 14 Nov 2020 15: 33
subject: 0.10 TL came to your account
posted by: gmail.com
signed: papara.com
security: standard encryption (TLS) learn more

并转换为text worked

body=msg.text或msg.htmlmsg.html worked,我转换为txt ty以获取帮助
# Make new mailbox instance.
mailbox = MailBox(IMAP_SERVER)
mailbox.login(EMAIL, PASSWORD, initial_folder='INBOX')
mailbox.folder.list()
# Print folder status.
folder_status = mailbox.folder.status('INBOX')
print(folder_status)

# Get unread emails.
user = await client.fetch_user(USER_ID)
msgs = [msg for msg in mailbox.fetch(AND(seen=False), mark_seen=True)]
# Hide content preview by replacing strings with regex.
for msg in msgs:

    # Find a match.
    message = msg.text
message = msg.html