mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-10 06:48:19 +02:00
add imaps STARTTLS support using +tls
This commit is contained in:
parent
71fcaa2ede
commit
0ee5efede9
2 changed files with 11 additions and 1 deletions
|
|
@ -193,6 +193,11 @@ class Mailbox(models.Model):
|
|||
"""Returns whether or not this mailbox's connection uses SSL."""
|
||||
return '+ssl' in self._protocol_info.scheme.lower()
|
||||
|
||||
@property
|
||||
def use_tls(self):
|
||||
"""Returns whether or not this mailbox's connection uses STARTTLS."""
|
||||
return '+tls' in self._protocol_info.scheme.lower()
|
||||
|
||||
@property
|
||||
def archive(self):
|
||||
"""Returns (if specified) the folder to archive messages to."""
|
||||
|
|
@ -223,6 +228,7 @@ class Mailbox(models.Model):
|
|||
self.location,
|
||||
port=self.port if self.port else None,
|
||||
ssl=self.use_ssl,
|
||||
tls=self.use_tls,
|
||||
archive=self.archive,
|
||||
folder=self.folder
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue