Andrew
2007-03-15 05:08:03 UTC
We have some code that's reading HTML emails from an exchange mailbox using
Webdav and has been quite happy for sometime. A snippet of code from it is as
follows:
strMailboxURI = "http://10.88.12.240/exchange/andrewp/inbox"
oXMLHTTP = New MSXML2.ServerXMLHTTP40
oXMLHTTP.open("PROPFIND", strMailboxURI, False, strAlias, strPassword)
oXMLHTTP.setRequestHeader("Content-type", "xml")
oXMLHTTP.setRequestHeader("Depth", "1")
oXMLHTTP.send()
Dim XMLDocument As System.Xml.XmlDataDocument
XMLDocument = New System.Xml.XmlDataDocument
XMLDocument.LoadXml(oXMLHTTP.responseText)
DisplayNameNodes1 = XMLDocument.GetElementsByTagName("e:htmldescription")
If DisplayNameNodes1.Count > 0 Then
DisplayChildNodes = DisplayNameNodes1.Item(0).FirstChild
strHTMLBody = DisplayChildNodes.InnerText()
end if
So if there were any emails within the inbox we used to get the html content
stored with strHTMLBody for further processing.
Something must have changed, and not the coding, but the process stopped
working, now when we run the same code we don't get any htmldescription tags
at all within the XML document returned from Exchange.
Would anyone have an idea why this might happen? Or suggestions for using
webdav another way to retrieve this information.
A snippet of what is returned is this:
<?xml version="1.0"?>
<a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:c="xml:" xmlns:d="http://schemas.microsoft.com/repl/" xmlns:a="DAV:">
<a:response>
<a:href>http://10.88.12.240/exchange/andrewp/Inbox/</a:href>
<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<a:contentclass>urn:content-classes:mailfolder</a:contentclass>
<a:resourcetype><a:collection/></a:resourcetype>
<a:creationdate b:dt="dateTime.tz">2005-12-10T03:33:34.399Z</a:creationdate>
<a:ishidden b:dt="boolean">0</a:ishidden>
<a:parentname>http://10.88.12.240/exchange/andrewp/</a:parentname>
<a:getcontentlength b:dt="int">0</a:getcontentlength>
<a:isstructureddocument b:dt="boolean">0</a:isstructureddocument>
<d:repl-uid>rid:29e6d71fd57b954b90017edb46707ed4000000009f6d</d:repl-uid>
<a:displayname>Inbox</a:displayname>
<a:href>http://10.88.12.240/exchange/andrewp/Inbox/</a:href>
<a:isreadonly b:dt="boolean">0</a:isreadonly>
<a:getlastmodified
b:dt="dateTime.tz">2007-03-14T19:56:33.853Z</a:getlastmodified>
<a:iscollection b:dt="boolean">1</a:iscollection>
<d:resourcetag>rt:29e6d71fd57b954b90017edb46707ed4000000009f6d29e6d71fd57b954b90017edb46707ed40000005b4952</d:resourcetag>
</a:prop>
</a:propstat>
</a:response>
Thanks in advance......
Webdav and has been quite happy for sometime. A snippet of code from it is as
follows:
strMailboxURI = "http://10.88.12.240/exchange/andrewp/inbox"
oXMLHTTP = New MSXML2.ServerXMLHTTP40
oXMLHTTP.open("PROPFIND", strMailboxURI, False, strAlias, strPassword)
oXMLHTTP.setRequestHeader("Content-type", "xml")
oXMLHTTP.setRequestHeader("Depth", "1")
oXMLHTTP.send()
Dim XMLDocument As System.Xml.XmlDataDocument
XMLDocument = New System.Xml.XmlDataDocument
XMLDocument.LoadXml(oXMLHTTP.responseText)
DisplayNameNodes1 = XMLDocument.GetElementsByTagName("e:htmldescription")
If DisplayNameNodes1.Count > 0 Then
DisplayChildNodes = DisplayNameNodes1.Item(0).FirstChild
strHTMLBody = DisplayChildNodes.InnerText()
end if
So if there were any emails within the inbox we used to get the html content
stored with strHTMLBody for further processing.
Something must have changed, and not the coding, but the process stopped
working, now when we run the same code we don't get any htmldescription tags
at all within the XML document returned from Exchange.
Would anyone have an idea why this might happen? Or suggestions for using
webdav another way to retrieve this information.
A snippet of what is returned is this:
<?xml version="1.0"?>
<a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:c="xml:" xmlns:d="http://schemas.microsoft.com/repl/" xmlns:a="DAV:">
<a:response>
<a:href>http://10.88.12.240/exchange/andrewp/Inbox/</a:href>
<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<a:contentclass>urn:content-classes:mailfolder</a:contentclass>
<a:resourcetype><a:collection/></a:resourcetype>
<a:creationdate b:dt="dateTime.tz">2005-12-10T03:33:34.399Z</a:creationdate>
<a:ishidden b:dt="boolean">0</a:ishidden>
<a:parentname>http://10.88.12.240/exchange/andrewp/</a:parentname>
<a:getcontentlength b:dt="int">0</a:getcontentlength>
<a:isstructureddocument b:dt="boolean">0</a:isstructureddocument>
<d:repl-uid>rid:29e6d71fd57b954b90017edb46707ed4000000009f6d</d:repl-uid>
<a:displayname>Inbox</a:displayname>
<a:href>http://10.88.12.240/exchange/andrewp/Inbox/</a:href>
<a:isreadonly b:dt="boolean">0</a:isreadonly>
<a:getlastmodified
b:dt="dateTime.tz">2007-03-14T19:56:33.853Z</a:getlastmodified>
<a:iscollection b:dt="boolean">1</a:iscollection>
<d:resourcetag>rt:29e6d71fd57b954b90017edb46707ed4000000009f6d29e6d71fd57b954b90017edb46707ed40000005b4952</d:resourcetag>
</a:prop>
</a:propstat>
</a:response>
Thanks in advance......