精华区 [关闭][返回]

当前位置:月光软件>>讨论区精华>>〖软件开发〗>>● ASP>>★ASP的技巧★>>组件开发及应用>>ASP访问Exchange Server问题

主题:ASP访问Exchange Server问题
发信人: hexh()
整理人: dongbao(2002-04-19 16:38:48), 站内信件
<%
Response.Status = ("401 Unauthorized")
bstrServer = "SERVER2"
Dim objSession,objMessage
Dim bstrProfileInfo
Set objSession=Server.CreateObject("MAPI.Session")
bstrProfileInfo="SERVER2" & Chr(10) & "administrator"
objSession.Logon "","",False,True,0,True,bstrProfileInfo
Set ObjMessage=objSession.Outbox.Messages.Add
'如果没有第一句(Response.Status=("401 Unauthorized")就出错,出错信息如


'*******************************************************************

*******************************
'Collaboration Data Objects 错误 '00000505'
'You do not have permission to log on. [Microsoft Exchange Server In

formation Store - [MAPI_E_FAILONEPROVIDER(8004011D)]]
'/email/sendmessage.asp, 行14

'我的想法是:
'Exchange需要验证administrator的口令,这可以理解,否则怎么能够往adminis

trator的Outbox里面添加信息呢?
'问题在于我不想它弹出一个身份验证的窗口
'另外,如果有第一句的身份验证,则要进行三次登录,并且把这个E-mail重复发送

,why?
'******************************************************************

*******************************
objMessage.Subject="TEST"
objMessage.Text="TEST"
Set objonerecip = objmessage.Recipients.Add
objonerecip.Name = "[email protected]"
objonerecip.Resolve
objMessage.Send
objSession.Logoff
%> 

--
※ 来源:.网易虚拟社区北京站 http://bj.netease.com.[FROM: 202.103.28.31]

[关闭][返回]






转载请注明:转载自 月光程序代码网 [ http://www.moon-soft.com ]