forked from mirror/django-mailbox
add imaps STARTTLS support (#94)
* add imaps STARTTLS support using +tls * documentation on STARTTLS
This commit is contained in:
parent
0f990a44d5
commit
8a73076427
3 changed files with 18 additions and 7 deletions
|
|
@ -144,6 +144,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."""
|
||||
|
|
@ -174,6 +179,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