<% @ LANGUAGE=VBSCRIPT CODEPAGE = 1252 %>
<!--#include file="../constant.inc" -->
<!--#include file="../lib/session.inc" -->
<% SendHeader 1, 1 %>
<!--#include file="../lib/getrend.inc" -->
<%
'<!--Microsoft Outlook Web Access-->
'<!--Find User detcmds.asp : Send mail to account visible in details. -->
'<!--Copyright (c) Microsoft Corporation 1993-1998. All rights reserved.-->
CheckSession
strAddrEntryID = Request.QueryString("obj")
bstrCommand = Request.QueryString("cmd")
Set objAddrEntry = objOMSession.GetAddressEntry(strAddrEntryID)
If Err.Number <> 0 or objAddrEntry Is Nothing Then
ReportErrorClose L_errOpeningAddressEntry_ErrorMessage
End If
Select Case bstrCommand
Case "mailcontact", "mtgcontact"
GenerateResponse
End Select
Function GenerateResponse()
'Create a new message in memory
Randomize
bstrNewObj = cstr(int(100000 * Rnd()))
if bstrCommand = "mailcontact" Then
bstrFormPath = bstrVirtRoot + "/forms/ipm/note/frmRoot.asp?command=new&obj=" + bstrNewObj
Set Session(bstrNewObj) = objOMSession.Outbox.Messages.Add
Session(bstrNewObj).Type = "IPM.Note"
Else
bstrFormPath = bstrVirtRoot + "/forms/ipm/schedule/meeting/request/frmRoot.asp?command=new&type=1&obj=" + bstrNewObj
Set Session(bstrNewObj) = objOMSession.GetDefaultFolder(0).Messages.Add
Session(bstrNewObj).MeetingStatus = 1
Session(bstrNewObj).Type = "IPM.Schedule.Meeting.Request"
End If
bstrBodyTag = "<body text=000000 onLoad=""LaunchForm('" + bstrFormPath + "')"">"
EmailAddresses = objAddrEntry.Fields.Item(ActMsgPR_EMS_AB_PROXY_ADDRESSES)
Count = UBound(EmailAddresses)
For i = LBound(EmailAddresses) To Count
If Instr(EmailAddresses(i), "SMTP:") = 1 then
Exit For
End If
Next
Session(bstrNewObj).Recipients.AddMultiple objAddrEntry.Fields(ActMsgPR_DISPLAY_NAME) & " [" & EmailAddresses(i) & "]", 1
AddIDToCache(bstrNewObj)
Response.Redirect bstrFormPath
End Function
%>