roadcone20
Programmer
Hey, first time poster here. I have a question about a script I'm trying to write in ASP. Basically at this point all I want to do is access the inbox of an email account. I wrote this script and it works when "email name" (in the code below) is set to my own email, but it gives me this error when I change it to the account that I want to access:
Error Type:
Collaboration Data Objects (0x4F7)
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
I figured it would be permissions on the email account, but I have full access to it. Any ideas?
Thanks a lot. The script follows:
<%
bstrServer = "amt-exc3"
bstrMailbox = "email name"
bstrProfileInfo = bstrServer + vbLF + bstrMailbox
'CreateObject MAPI.Session
Set objSession = Server.CreateObject("MAPI.Session"
objSession.Logon "", "", False, True, 0, True, bstrProfileInfo
Set objFolder = objSession.Inbox
Response.write objFolder.Name
Set objMessages = objFolder.Messages
For Each objMessage In objMessages
Response.Write objMessage.Subject & "<br>"
'Response.Write objMessage.Subject & ":" & objMessage.Text & "<br>"
Next
%>
Error Type:
Collaboration Data Objects (0x4F7)
[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
I figured it would be permissions on the email account, but I have full access to it. Any ideas?
Thanks a lot. The script follows:
<%
bstrServer = "amt-exc3"
bstrMailbox = "email name"
bstrProfileInfo = bstrServer + vbLF + bstrMailbox
'CreateObject MAPI.Session
Set objSession = Server.CreateObject("MAPI.Session"
objSession.Logon "", "", False, True, 0, True, bstrProfileInfo
Set objFolder = objSession.Inbox
Response.write objFolder.Name
Set objMessages = objFolder.Messages
For Each objMessage In objMessages
Response.Write objMessage.Subject & "<br>"
'Response.Write objMessage.Subject & ":" & objMessage.Text & "<br>"
Next
%>