summaryrefslogtreecommitdiffstats
path: root/tests/functional/purge_imap.py
blob: d3827a42f01346df3dccb793e7b1b0fe01653267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import pykolab

from pykolab import wap_client
from pykolab.imap import IMAP

conf = pykolab.getConf()

def purge_imap():
    imap = IMAP()
    imap.connect()
    for folder in imap.lm():
        try:
            imap.dm(folder)
        except:
            pass