本文整理匯總了Python中pykolab.imap.IMAP.user_mailbox_create_additional_folders方法的典型用法代碼示例。如果您正苦於以下問題:Python IMAP.user_mailbox_create_additional_folders方法的具體用法?Python IMAP.user_mailbox_create_additional_folders怎麽用?Python IMAP.user_mailbox_create_additional_folders使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pykolab.imap.IMAP
的用法示例。
在下文中一共展示了IMAP.user_mailbox_create_additional_folders方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: setup_class
# 需要導入模塊: from pykolab.imap import IMAP [as 別名]
# 或者: from pykolab.imap.IMAP import user_mailbox_create_additional_folders [as 別名]
def setup_class(self, *args, **kw):
# set language to default
pykolab.translate.setUserLanguage(conf.get('kolab','default_locale'))
self.itip_reply_subject = _('"%(summary)s" has been %(status)s')
from tests.functional.purge_users import purge_users
purge_users()
self.john = {
'displayname': 'John Doe',
'mail': '[email protected]',
'dn': 'uid=doe,ou=People,dc=example,dc=org',
'preferredlanguage': 'en_US',
'mailbox': 'user/[email protected]',
'kolabcalendarfolder': 'user/john.doe/[email protected]',
'kolabtasksfolder': 'user/john.doe/[email protected]',
'kolabinvitationpolicy': ['ACT_UPDATE_AND_NOTIFY','ACT_MANUAL']
}
self.jane = {
'displayname': 'Jane Manager',
'mail': '[email protected]',
'dn': 'uid=manager,ou=People,dc=example,dc=org',
'preferredlanguage': 'en_US',
'mailbox': 'user/[email protected]',
'kolabcalendarfolder': 'user/jane.manager/[email protected]',
'kolabtasksfolder': 'user/jane.manager/[email protected]',
'kolabconfidentialcalendar': 'user/jane.manager/Calendar/[email protected]',
'kolabinvitationpolicy': ['ACT_ACCEPT_IF_NO_CONFLICT','ACT_REJECT_IF_CONFLICT','TASK_ACCEPT','ACT_UPDATE']
}
self.jack = {
'displayname': 'Jack Tentative',
'mail': '[email protected]',
'dn': 'uid=tentative,ou=People,dc=example,dc=org',
'preferredlanguage': 'en_US',
'mailbox': 'user/[email protected]',
'kolabcalendarfolder': 'user/jack.tentative/[email protected]',
'kolabtasksfolder': 'user/jack.tentative/[email protected]',
'kolabinvitationpolicy': ['ACT_TENTATIVE_IF_NO_CONFLICT','ALL_SAVE_TO_FOLDER','ACT_UPDATE']
}
self.mark = {
'displayname': 'Mark German',
'mail': '[email protected]',
'dn': 'uid=german,ou=People,dc=example,dc=org',
'preferredlanguage': 'de_DE',
'mailbox': 'user/[email protected]',
'kolabcalendarfolder': 'user/mark.german/[email protected]',
'kolabtasksfolder': 'user/mark.german/[email protected]',
'kolabinvitationpolicy': ['ACT_ACCEPT','ACT_UPDATE_AND_NOTIFY']
}
self.external = {
'displayname': 'Bob External',
'mail': '[email protected]'
}
from tests.functional.user_add import user_add
user_add("John", "Doe", kolabinvitationpolicy=self.john['kolabinvitationpolicy'], preferredlanguage=self.john['preferredlanguage'])
user_add("Jane", "Manager", kolabinvitationpolicy=self.jane['kolabinvitationpolicy'], preferredlanguage=self.jane['preferredlanguage'])
user_add("Jack", "Tentative", kolabinvitationpolicy=self.jack['kolabinvitationpolicy'], preferredlanguage=self.jack['preferredlanguage'])
user_add("Mark", "German", kolabinvitationpolicy=self.mark['kolabinvitationpolicy'], preferredlanguage=self.mark['preferredlanguage'])
time.sleep(1)
from tests.functional.synchronize import synchronize_once
synchronize_once()
# create confidential calendar folder for jane
imap = IMAP()
imap.connect(domain='example.org') # sets self.domain
imap.user_mailbox_create_additional_folders(self.jane['mail'], {
'Calendar/Confidential': {
'annotations': {
'/shared/vendor/kolab/folder-type': "event",
'/private/vendor/kolab/folder-type': "event.confidential"
}
}
})
imap.disconnect()