CDO and ASP works on webserver but not on clients
Hi,
I have written a helpdesk application that sends emails to users when activity occurs on their helpdesk cases. The email module uses the CDO MAPI objects to log onto the HelpDesk mail box and send an email to the appropriate user.
The website is running on my own machine at the moment which is running Windows XP. My test server is suffering the same problem running IIS5 and windows 2000 server.
Essentially the code works perfectly when logged onto the local machine. No errors are presented and the emails are sent. However if I log into the application from a remote machine the code fails showing the error "MAPI_E_LOGON_FAILED"
I have created a test page with the following code :
on error resume next
Set objSession = Server.CreateObject("MAPI.Session")
response.write "Create Session - Error no: " & err.number & "<BR>" & "Description : " & err.description & "<BR>"
err.clear
objSession.Logon "", "", False, True, 0, True, "Saturn" & vbLF & "Help Desk"
response.write "Logon - Error no: " & err.number & "<BR>" & "Description : " & err.description & "<BR>"
err.clear
response.write "Current User - " & objSession.CurrentUser & "<BR>"
response.write "ASP Current User - " & Request.ServerVariables("LOGON_USER") & "<BR>"
err.clear
Set objMessage = objSession.Outbox.Messages.Add
response.write "Add Message - Error no: " & err.number & "<BR>" & "Description : " & err.description & "<BR>"
err.clear
The results of which, when run from a remote machine are as follows :
Create Session - Error no: 0
Description :
Logon - Error no: 0
Description :
Current User - Unknown
ASP Current User - <domain>\MatthewB
Add Message - Error no: -2147221231
Description : The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]
Anyone any ideas as I am completely stumped.
Thanks
Matt
|