forked from mirror/django-mailbox
Update office365.py and models.py
This commit is contained in:
parent
912f091d3f
commit
dca20e1e1c
2 changed files with 3 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
class Office365Transport(EmailTransport):
|
class Office365Transport(EmailTransport):
|
||||||
def __init__(
|
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
|
archive='', folder=None, client_id=None, client_secret=None, tenant_id=None
|
||||||
):
|
):
|
||||||
self.max_message_size = getattr(
|
self.max_message_size = getattr(
|
||||||
|
|
@ -23,7 +23,6 @@ class Office365Transport(EmailTransport):
|
||||||
'DJANGO_MAILBOX_INTEGRATION_TESTING_SUBJECT',
|
'DJANGO_MAILBOX_INTEGRATION_TESTING_SUBJECT',
|
||||||
None
|
None
|
||||||
)
|
)
|
||||||
self.hostname = hostname
|
|
||||||
self.port = port
|
self.port = port
|
||||||
self.archive = archive
|
self.archive = archive
|
||||||
self.folder = folder
|
self.folder = folder
|
||||||
|
|
@ -59,7 +58,7 @@ class Office365Transport(EmailTransport):
|
||||||
# # splitting into individual UIDs.
|
# # splitting into individual UIDs.
|
||||||
# if message_id_string:
|
# if message_id_string:
|
||||||
# return message_id_string.decode().split(' ')
|
# return message_id_string.decode().split(' ')
|
||||||
# return []
|
return []
|
||||||
|
|
||||||
def _get_small_message_ids(self, message_ids):
|
def _get_small_message_ids(self, message_ids):
|
||||||
# Using existing message uids, get the sizes and
|
# Using existing message uids, get the sizes and
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ class Mailbox(models.Model):
|
||||||
@property
|
@property
|
||||||
def tenant_id(self):
|
def tenant_id(self):
|
||||||
"""Returns (if specified) the tenant id for Office365."""
|
"""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:
|
if not tenant_id:
|
||||||
return None
|
return None
|
||||||
return tenant_id[0]
|
return tenant_id[0]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue