ikvk / imap_tools

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

How to get just the body of the email and drop any reply information. #219

Closed jslovern391 closed 1 year ago

jslovern391 commented 1 year ago

I would like to just get the body of the new incoming email and none of the reply information. Is this possible?

ikvk commented 1 year ago

Strange question. Email has two base body variants: msg.text and msg.html

example: https://github.com/ikvk/imap_tools#id4

please calculate for me (no offense): 2 + 2 * 2

jslovern391 commented 1 year ago

The question about the body was based on seeing it as a search criterion. What I saw was the header information in the body of replies. As for the second question, is there a way to separate the new message from the replies?

jslovern391 commented 1 year ago

I have successfully parsed in Python what I want. The question now is does the move criteria just 'ALL' or can it be the current emails uid?

mailbox.move(mailbox.uids(), 'Read')

jslovern391 commented 1 year ago

Figure it out.

jslovern391 commented 1 year ago

I figured it out.