ikvk / imap_tools

Work with email by IMAP
Apache License 2.0
717 stars 83 forks source link

print Body of a mail #194

Closed amankumarchagti closed 1 year ago

amankumarchagti commented 1 year ago

Use the below code, I am not able to print the body of the mail. Can anyone help? Thank you

from imap_tools import MailBox, A, AND, OR, NOT
with MailBox('outlook.office365.com').login('mailsx@mail.com', 'pwd') as mailbox:
    for msg in mailbox.fetch(A(seen=False)):
            print(msg.text)
ikvk commented 1 year ago

msg.html