1
0
Fork 0

Update models.py, __init__.py, and office365.py

This commit is contained in:
Pietro Mingo 2022-07-26 21:32:10 +02:00
parent 40263b6670
commit 01984e2ba8
3 changed files with 134 additions and 1 deletions

View file

@ -31,7 +31,7 @@ from django_mailbox import utils
from django_mailbox.signals import message_received
from django_mailbox.transports import Pop3Transport, ImapTransport, \
MaildirTransport, MboxTransport, BabylTransport, MHTransport, \
MMDFTransport, GmailImapTransport
MMDFTransport, GmailImapTransport, Office365Transport
logger = logging.getLogger(__name__)
@ -223,6 +223,9 @@ class Mailbox(models.Model):
ssl=self.use_ssl
)
conn.connect(self.username, self.password)
elif self.type == 'office365':
conn = Office365Transport(self.location)
conn.connect(self.username, self.password)
elif self.type == 'maildir':
conn = MaildirTransport(self.location)
elif self.type == 'mbox':