https://files.zimbra.com/docs/soap_api/8.8.15/api-reference/zimbraMail/GetMsg.html#tbl-GetMsgRequest-m-id
In order to attempt to pull the contents of an individual message, given it's ID.
I'm able to authenticate correctly:
Code: Select all
usr_token = auth.authenticate(
url,
'fakeemail@fake.email',
'**********************************************************'
)
and make other requests:
Code: Select all
search_request = comm.gen_request(token=usr_token)
search_request.add_request(
'SearchRequest',
{
'query': 'in:inbox',
'limit': 1000,
'resultMode' : 'IDS'
},
'urn:zimbraMail'
)
search_response = comm.send_request(search_request)
However when I make a "GetMsgRequest":
Code: Select all
msg_request.add_request(
'GetMsgRequest',
{
'm': {
'id': "-3981"
}
},
'urn:zimbraMail'
even given a msg ID that I'm certain exists (based on the output of the above search request) I still get a "no such message" fault.
Code: Select all
{'Fault': {'Code': {'Value': 'soap:Sender'}, 'Reason': {'Text': 'no such message: -3981'}, 'Detail': {'Error': {'Code': 'mail.NO_SUCH_MSG', 'Trace': 'qtp366590980-679210:1600355135420:05591e196a69dc85', 'a': {'n': 'itemId', 't': 'IID', '_content': '-3981'}}}}}
Am I formatting my request incorrectly? I think that's likely the case but I'm not sure how to ammend it to be correct.