forked from mirror/django-mailbox
Create archive folder if it does not exist.
This commit is contained in:
parent
bf2f0c89d4
commit
0aa757955d
1 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue