ASP訪問Exchange Server問題
發(fā)表時間:2024-02-14 來源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]<% 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")就出錯,出錯信息如 下
'*******************************************************************
******************************* '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里面添加信息呢?
'問題在于我不想它彈出一個身份驗證的窗口 '另外,如果有第一句的身份驗證,則要進(jìn)行三次登錄,并且把這個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 %> %> (出處:熱點網(wǎng)絡(luò))