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

Create archive folder if it does not exist.

This commit is contained in:
Adam Coddington 2014-05-25 12:57:38 -07:00
parent bf2f0c89d4
commit 0aa757955d

View file

@ -30,8 +30,9 @@ class ImapTransport(EmailTransport):
if self.archive:
typ, folders = self.server.list(pattern=self.archive)
if folders[0] == None:
self.archive = False
if folders[0] is None:
# If the archive folder does not exist, create it
self.server.create(self.archive)
for key in inbox[0].split():
try: