summaryrefslogtreecommitdiffstats
path: root/pykolab/cli/cmd_delete_mailbox.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/cli/cmd_delete_mailbox.py')
-rw-r--r--pykolab/cli/cmd_delete_mailbox.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pykolab/cli/cmd_delete_mailbox.py b/pykolab/cli/cmd_delete_mailbox.py
index 99404ff..68e1735 100644
--- a/pykolab/cli/cmd_delete_mailbox.py
+++ b/pykolab/cli/cmd_delete_mailbox.py
@@ -49,7 +49,9 @@ def execute(*args, **kw):
imap = IMAP()
imap.connect()
- delete_folders = imap.lm(delete_folder)
+
+ delete_folders = imap.list_folders(delete_folder)
+
for delete_folder in delete_folders:
- imap.delete_mailfolder(delete_folder)
+ imap.delete_mailfolder(imap.folder_utf8(delete_folder))