diff options
author | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-05-05 14:16:58 -0300 |
---|---|---|
committer | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-05-05 14:16:58 -0300 |
commit | 48a85e702a238c6fab4afe3104470c55d88c374a (patch) | |
tree | 507a0b05f1f1a8d94c94ba88e2756255df9f43fa /service/pixelated | |
parent | 8d6f1c238c07f4abeb7b73dd44a39e86095e1465 (diff) |
#337 Create mailbox if it already does not exist
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/maintenance.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/service/pixelated/maintenance.py b/service/pixelated/maintenance.py index b4e616a7..888c5b8d 100644 --- a/service/pixelated/maintenance.py +++ b/service/pixelated/maintenance.py @@ -148,6 +148,9 @@ def delete_all_mails(args): def add_mail_folder(account, maildir, folder_name, deferreds): + if folder_name not in account.mailboxes: + account.addMailbox(folder_name) + mbx = account.getMailbox(folder_name) for mail in maildir: flags = (WithMsgFields.RECENT_FLAG,) if mail.get_subdir() == 'new' else () |