Skip to content

Commit

Permalink
html seiten als string
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartasWar committed Nov 29, 2024
1 parent 938d39f commit 66c631a
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions EMailService.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ def get_emails(self, date : datetime = None)->list[Email]:
body = part.get_payload(decode=True)
print("Text Plain")

#safe HTML parts
if html_parts:
for i,html in enumerate(html_parts):
htmlfilename = f"email_{Uid}_part_{i+1}.html"
with open(htmlfilename,"w",encoding="utf-8") as f:
f.write(html)
html_file_names.append(htmlfilename)
#get
else:
body = email_message.get_payload(decode=True)
Expand All @@ -174,10 +167,10 @@ def get_emails(self, date : datetime = None)->list[Email]:
to_recipients = email_message["to"],
cc_recipients = email_message["cc"],
bcc_recipients = email_message["bcc"],
html_files = html_file_names)]
html_files = html_parts)]
return listofMails

def getDeletedEmail(self)->list[str]:
def get_deleted_email(self)->list[str]:
listofUIPsDatenbank = []
listofUIPsIMAP = []
for mailbox in self.IMAP.list_folders():
Expand Down

0 comments on commit 66c631a

Please sign in to comment.