home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 March / CHIPCD_3_98.iso / software / testsoft / exchange / webdata / usa / forms / amunres.asp next >
Text File  |  1997-08-25  |  3KB  |  91 lines

  1. <!--#include file="../constant.inc"-->
  2. <!--#include file="../lib/session.inc"-->
  3.  
  4. <%
  5. '<!--Microsoft Outlook Web Access-->
  6. '<!--amunres.asp - Ambiguous Recipients window
  7. '<!--Copyright (c) Microsoft Corporation 1993-1997. All rights reserved.-->
  8. On Error resume next
  9.  
  10. CheckSession
  11. bstrObj = Request.QueryString("obj")
  12. url = Request.QueryString()
  13. If bstrObj = "" then
  14.     bstrObj = Request.Form("objID")
  15. End If
  16.  
  17. 'Get the msg object in memory
  18. Set objMsg = Session(bstrObj)
  19.  
  20. If objMsg Is Nothing then
  21.     Set objMsg = OpenMessage(bstrObj)
  22. End If
  23.  
  24.  
  25. Set objRecipient = objMsg.Recipients.GetFirstUnresolved
  26. While Not objRecipient Is Nothing
  27.   Set objAmbiguousEntries = objRecipient.AmbiguousNames
  28.  
  29.       bstrRecipientName = objRecipient.Name
  30.       bstrRecipientName = BStringToJString(bstrRecipientName)
  31.       
  32.       If objAmbiguousEntries is Nothing Then
  33.           bstrNames = bstrNames + "<li><b>"
  34.           bstrNames = bstrNames + bstrRecipientName
  35.           L_NoMatches_Text = "(No matches)"
  36.           bstrNames = bstrNames + "</b>" + L_NoMatches_Text + "</li>"
  37.          
  38.       Else
  39.         ' this is how many entries matched what the user typed...
  40.         cEntries = objAmbiguousEntries.Count
  41.         ' ...and this is how many we'll list out.
  42.         cEntriesMax = 10
  43.  
  44.         bstrNames = bstrNames + "<li><b>"       
  45.         bstrNames = bstrNames + bstrRecipientName
  46.  
  47.         L_Matches_Text = "matches"
  48.         bstrNames = bstrNames + "</b> (" & cEntries & " " & L_Matches_Text & "):</li>"
  49.         If cEntries <= cEntriesMax Then
  50.             bstrNames = bstrNames + "<ol>"
  51.             For i = 1 To cEntries
  52.                 Set objOneRecip = objAmbiguousEntries.Item(i)
  53.       bstrRecipientName = objOneRecip.Name
  54.                 bstrRecipientName = BStringToJString(bstrRecipientName)
  55.                 bstrNames = bstrNames + "<li><font size=-1>" + bstrRecipientName
  56.                 GetSMTPAddress objOneRecip, strSMTP
  57.                 If Len(strSMTP) > 0 Then
  58.                     bstrNames = bstrNames + "[" & strSMTP & "]</font></li>"
  59.                 End If
  60.             Next
  61.             bstrNames = bstrNames + "</ol>"
  62.         Else
  63.             L_TooManyMatches_Text = "Too many matches. Please use the Find Names page to find the recipient you wish to send to."
  64.             bstrNames = bstrNames + "<ul>" + "<li><font size=-1>" + L_TooManyMatches_Text + "</font></li>" + "</ul>"
  65.         End If
  66.     End If
  67.     Set objRecipient = objMsg.Recipients.GetNextUnresolved
  68. Wend
  69.  
  70. L_NameResolution_Message = "Some addresses could not be resolved.\n\nPlease select the complete address of the\nrecipient you want from the list of Unresolved\nRecipients. Paste the address into the correct\nrecipient line."
  71.  
  72.  
  73. %>
  74.  
  75. <HTML>
  76. <HEAD>
  77. <TITLE>Ambiguous Recipients</TITLE>
  78. </HEAD>
  79.  
  80. <BODY bgcolor="#c0c0c0">
  81. <Form>
  82. <table width=100%><tr><td width=100% align=right>
  83. <input type="button" value="Close" onClick="parent.close();"></td></tr></table>
  84. </Form>
  85. <script language='javascript'>
  86.     alert("<%=L_NameResolution_Message%>")
  87. </script>
  88. <%=bstrNames%>
  89. </BODY>
  90. </HTML>
  91.