-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
I'm trying to listen for new emails being added, getting emptiness. How can I view new letters correctly?
info_request = comm.gen_request(token=usr_token)
iinfo_request = comm.gen_request(token=usr_token)
#Create waitset
info_request.add_request(
'CreateWaitSetRequest',
{
'defTypes': 'f,m,c',
'add': {
'a': {
'name': 'my@mail',
'types': 'f,m,c'
},
},
},
'urn:zimbraMail'
)
info_response = comm.send_request(info_request)
if not info_response.is_fault():
waitset = (info_response.get_response()['CreateWaitSetResponse']['waitSet'])
seq = (info_response.get_response()['CreateWaitSetResponse']['seq'])
defTypes = (info_response.get_response()['CreateWaitSetResponse']['defTypes'])
......
everything above works. I get values
{u'CreateWaitSetResponse': {u'waitSet': u'WaitSet-064715ab-1867-4254-ac38-63bfd6255484', u'defTypes': u'f,m,c', u'seq': 0}}
.......
iinfo_request.add_request(
'WaitSetRequest',
{
'waitSet': waitset,
'seq': seq,
'block': '1',
'defTypes': defTypes,
'timeout': '1000',
'expand': '1',
'add': {
'a': {
'name': 'my@mail',
'token': '',
'types': defTypes
},
},
},
'urn:zimbraMail'
)
iinfo_response = comm.send_request(iinfo_request)
if not iinfo_response.is_fault():
print (iinfo_response.get_response()['WaitSetResponse'])
I think the problem is here
if not iinfo_response.is_fault():
print (iinfo_response.get_response()['WaitSetResponse'])
Result:
[root@mail zmadmin]# python ./test.py
[root@mail zmadmin]#
I want to see:
[root@mail zmadmin]# python ./test.py
{u'WaitSetResponse': {u'waitSet': u'WaitSet-064715ab-1867-4254-ac38-63bfd6255484', ... bla-bla-bla
{u'WaitSetResponse': {u'waitSet': u'WaitSet-064715ab-1867-4254-ac38-63bfd6255484', ... bla-bla-bla
{u'WaitSetResponse': {u'waitSet': u'WaitSet-064715ab-1867-4254-ac38-63bfd6255484', ... bla-bla-bla
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels