• RSS
  • Twitter
  • FaceBook

Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

putting Emails on webpage using webdav

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2000] >> Outlook Web Access >> putting Emails on webpage using webdav Page: [1]
Login
Message << Older Topic   Newer Topic >>
putting Emails on webpage using webdav - 7.Dec.2005 5:46:55 PM   
pari_garapati

 

Posts: 10
Joined: 22.Nov.2005
Status: offline
 

Here is my code.. i am putting emails on webpage using HTTP(webdav) Html file is  working fine. but when i am calling this html page through peoplesoft it saying access denied Error or permission Denied.. why this problem is occuring please anyone can suggest me how to solve this problem. i would be grateful . It's very urgent

Thank you in advance...
<html>
<head>
<script language='VBScript'>
Dim objXMLHTTP, objXMLDoc
' Define your protocol; http or https
strProtocol = "https"
' Define your server name
strServername = "Servername"
' Define your local name for 'Inbox'
strInbox = "Inbox"
Sub getMessages_OnClick()
strUsername = document.all.mailbox.value
If strUsername <> "" Then
  strInboxURL = strProtocol & "://" & strServername & "/Exchange/"
  strInboxURL = strInboxURL & strUsername & "/" & strInbox
  Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP")
  objXMLHTTP.Open "SEARCH", strInboxURL, True
  objXMLHTTP.setRequestHeader "Content-type:", "text/xml"
  objXMLHTTP.setRequestHeader "Depth", "1"
  objXMLHTTP.onReadyStateChange = getRef("checkXMLHTTPState")
  strXML = "<?xml version='1.0' ?>" & _
   "<a:searchrequest xmlns:a='DAV:'><a:sql>" & _
     "SELECT" & _
     " ""DAV:href""" & _
     ",""urn:schemas:httpmail:subject""" & _
     " FROM scope('shallow traversal of """ & strInboxURL & """')" & _
    " WHERE ""DAV:ishidden""=False" & _
    " AND ""DAV:isfolder""=False" & _
   "</a:sql></a:searchrequest>"
  objXMLHTTP.SetRequestHeader "Range", "rows=0-9"
  objXMLHTTP.Send(strXML)
End If
End Sub
Sub checkXMLHTTPState
If objXMLHTTP.readyState = 4 Then
  responseStatus.innerHTML = objXMLHTTP.Status & " - " & objXMLHTTP.StatusText
  Set objXMLDoc = objXMLHTTP.ResponseXML
  XSLDiv.innerHTML = objXMLDoc.TransformNode(responseXSL.documentElement)
  Set objXMLHTTP = Nothing
  Set objXMLDoc = Nothing
End If
End Sub

<xml id='responseXSL'>
<xsl:template xmlns:xsl='uri:xsl' xmlns:a='DAV:' xmlns:d='urn:schemas:httpmail:'>
  <table>
    <!-- Add a row for each element in the 207 Multistatus response to the SEARCH request. -->
    <xsl:for-each select='a:multistatus/a:response'>
      <tr>
        <!-- Build a hyperlink using the resource href and subject -->
        <td>
          <a>
            <xsl:attribute name='href'>
              <xsl:value-of select='a:propstat/a:prop/a:href' />/?Cmd=open
            </xsl:attribute>
            <xsl:attribute name='target'>_blank</xsl:attribute>
            <xsl:value-of select='a:propstat/a:prop/d:subject' />
          </a>
        </td>
      </tr>
    </xsl:for-each>
  </table>
</xsl:template>
</xml>
</script>
</head>
<body>
<font face='Verdana' size='2'>
Mailbox name:<br>
<input type='text' name='mailbox'><br>
<input type='button' name='getMessages' value='    GO    '><br>
<div id='responseStatus'></div>
<div id='XSLDiv'></div>
</body>
</html>

_____________________________

Pari
Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2000] >> Outlook Web Access >> putting Emails on webpage using webdav Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Follow TechGenix on Twitter