1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

Update office365.py and models.py

This commit is contained in:
Serafim Bordei 2022-07-27 11:49:48 +02:00
parent 912f091d3f
commit dca20e1e1c
2 changed files with 3 additions and 4 deletions

View file

@ -10,7 +10,7 @@ logger = logging.getLogger(__name__)
class Office365Transport(EmailTransport):
def __init__(
self, hostname, port=None, ssl=False, tls=False,
self, port=None, ssl=False, tls=False,
archive='', folder=None, client_id=None, client_secret=None, tenant_id=None
):
self.max_message_size = getattr(
@ -23,7 +23,6 @@ class Office365Transport(EmailTransport):
'DJANGO_MAILBOX_INTEGRATION_TESTING_SUBJECT',
None
)
self.hostname = hostname
self.port = port
self.archive = archive
self.folder = folder
@ -59,7 +58,7 @@ class Office365Transport(EmailTransport):
# # splitting into individual UIDs.
# if message_id_string:
# return message_id_string.decode().split(' ')
# return []
return []
def _get_small_message_ids(self, message_ids):
# Using existing message uids, get the sizes and

View file

@ -208,7 +208,7 @@ class Mailbox(models.Model):
@property
def tenant_id(self):
"""Returns (if specified) the tenant id for Office365."""
tenant_id = self._query_string.get('tentant_id', None)
tenant_id = self._query_string.get('tenant_id', None)
if not tenant_id:
return None
return tenant_id[0]