mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-10 06:48:19 +02:00
clear code
This commit is contained in:
parent
b02fd73d1c
commit
8f944190ad
5 changed files with 26 additions and 93 deletions
|
|
@ -10,7 +10,3 @@ class EmailTransport:
|
|||
|
||||
return message
|
||||
|
||||
def get_email_from_string(self, contents):
|
||||
message = email.message_from_string(contents)
|
||||
|
||||
return message
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class Office365Transport(EmailTransport):
|
|||
for message in self.mailbox.get_messages(order_by='receivedDateTime'):
|
||||
try:
|
||||
mime_content = message.get_mime_content()
|
||||
message = self.get_email_from_string(mime_content)
|
||||
message = self.get_email_from_bytes(mime_content)
|
||||
|
||||
if condition and not condition(message):
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue