当我尝试从收件箱内的子文件夹中获取邮件的mimecontent时,出现此错误“ ErrorInvalidIdMalformed”。我使用下面的EWS soap请求获取mimecontent。
`
<?xml version=""1.0"" encoding=""utf-8""?>
<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/""
xmlns:t=""http://schemas.microsoft.com/exchange/services/2006/types"">
<soap:Header>
<t:RequestServerVersion Version=""Exchange2013"" />
</soap:Header>
<soap:Body>
<GetItem
xmlns=""http://schemas.microsoft.com/exchange/services/2006/messages""
xmlns:t=""http://schemas.microsoft.com/exchange/services/2006/types"">
<ItemShape>
<t:BaseShape>Default</t:BaseShape>
<t:IncludeMimeContent>true</t:IncludeMimeContent>
</ItemShape>
<ItemIds>
<t:ItemId Id = ""{0}""/>
</ItemIds>
</GetItem>
</soap:Body>
</soap:Envelope>"
`
问题:如何获得收件箱子文件夹中邮件的mimecontent?我是否应该更改soap请求并添加文件夹ID,然后提出邮件请求?
答案 0 :(得分:0)
错误告诉您使用的EWSId不正确,例如
<t:ItemId Id = ""{0}""/>
因此您用来检索该ID的代码不正确。