searchfolder_create.py 465 B

12345678910
  1. # Create a lot of dummy SFs
  2. import kopano
  3. s = kopano.Server(auth_user='bar', auth_pass='xbar')
  4. u = s.user('bar')
  5. for x in range(0, 10000):
  6. findroot = u.root.folder('FINDER_ROOT') # search folders are stored here as regular MAPI folders, but with the data coming from special DB tables
  7. print 'searchfolder count:', findroot.subfolder_count # count search folders
  8. sf = u.create_searchfolder() # create search folder in 'findroot'
  9. sf.search_start(u.inbox, 'blah')