明輝手游網(wǎng)中心:是一個(gè)免費(fèi)提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺(tái)!

ASP訪問Exchange Server問題

[摘要]<% Response.Status = ("401 Unauthorized") bstrServer = "SERVER2" Dim objSession,objMessage Dim bstrProfileInfo Set objSession=...

<% 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")就出錯(cuò),出錯(cuò)信息如 下
'*******************************************************************
******************************* 'Collaboration Data Objects 錯(cuò)誤 '00000505'
'You do not have permission to log on. [Microsoft Exchange Server In
formation Store - [MAPI_E_FAILONEPROVIDER(8004011D)]]
'/email/sendmessage.asp, 行14 '我的想法是:
'Exchange需要驗(yàn)證administrator的口令,這可以理解,否則怎么能夠往adminis trator的Outbox里面添加信息呢?
'問題在于我不想它彈出一個(gè)身份驗(yàn)證的窗口 '另外,如果有第一句的身份驗(yàn)證,則要進(jìn)行三次登錄,并且把這個(gè)E-mail重復(fù)發(fā)送 ,why?
'******************************************************************
******************************* objMessage.Subject="TEST"
objMessage.Text="TEST" Set objonerecip = objmessage.Recipients.Add
objonerecip.Name = "hexh@gemway.com" objonerecip.Resolve objMessage.Send
objSession.Logoff %> %> (出處:熱點(diǎn)網(wǎng)絡(luò))


相關(guān)文章