Code:
Const cStrServer = "Xchange"
Const cStrMailbox = "Admin"
bstrProfileInfo = cStrServer & vbLf & cStrMailbox
Set objSess = Server.CreateObject("MAPI.Session")
objSess.Logon "Admin","password",False,True, 0, True, bstrProfileInfo
Set objFBMess = objSess.Outbox.Messages.Add
objFBMess.Subject = "Test Exchange Mail"'Subject
objFBMess.Text = "Content of the mail"
Set objRecips = objFBMess.Recipients objRecips.AddMultiple "Admin;[email protected]"
objRecips.Resolve
objFBMess.Send
objSess.Logoff
Set objFBMess = nothing
Set objRecip = nothing
Set objSess = nothing
the above code work if i logon to the IIS server computer with "Admin" and run the asp page
but if i call that asp page from other computer(even with "Admin" account)it will show
Code:
Error Type:
Collaboration Data Objects (0x4F9)
The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]
i think because when i call that asp, it run as IUSR_MyServer so it doesn't have permission to access the mailbox of "Admin"
but i thought that if i provide the Logon information
Code:
objSess.Logon "Admin","password",False,True, 0, True, bstrProfileInfo
it would be ok, i don't want to set up IUSR_Server account on exchange and use its mailbox, i need to use the user mailbox to send email.
Any help would be great
Thanks