Skip to content

Commit

Permalink
test von in_reply_to
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartasWar committed Nov 29, 2024
1 parent b7f21b5 commit c89f026
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion EMailService.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ def delete_email(self, uid:int) -> bool:
def get_emails(self, date : date)->list[Email]:
listofMails = []
self.IMAP.select_folder("INBOX")
messages_ids = self.IMAP.search(["ALL"])
if date != None:

Check failure on line 115 in EMailService.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E711)

EMailService.py:115:20: E711 Comparison to `None` should be `cond is not None`
messages_ids = self.IMAP.search([u'SINCE',date])
else:
messages_ids = self.IMAP.search(["ALL"])
for msgid,message_data in self.IMAP.fetch(messages_ids,["RFC822","UID"]).items():
email_message = email.message_from_bytes(message_data[b"RFC822"])
Uid = message_data.get(b"UID")
Expand Down Expand Up @@ -157,6 +160,12 @@ def get_emails(self, date : date)->list[Email]:
else:
body = email_message.get_payload(decode=True)

#hier fehlt noch das date

in_reply_to = email_message["in_reply_to"]
print(in_reply_to)


listofMails += [create_email(
uid = Uid,
sender = email_message["from"],
Expand Down
Binary file modified __pycache__/email2.cpython-312.pyc
Binary file not shown.

0 comments on commit c89f026

Please sign in to comment.