Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending email with MAPI.Session

Status
Not open for further replies.

yuli1104

Programmer
Feb 20, 2002
60
CA
Hello, please help with me

part of my test.asp code:

Set MapiObj = CreateObject("MAPI.Session")
vstrExchangeSvr = "prd01"
vstrExchangeMailBox = "Myalias"
MapiObj.Logon "", "", False, True, 0, True, "prd01" & VBLF & vstrExchangeMailBox
Set objMess = MapiObj.Outbox.Messages.Add
objMess.Subject = "Help"
objMess.Text = "My body"
objMess.Recipients.Add "help@company.com"
objMess.Recipients.Resolve
objMess.Update
objMess.Send
MapiObj.Logoff
set objMess = nothing
set MapiObj = nothing

I put this code on my local webserver. when I execute test.asp on my machine. the help@company.com can get the email well. Then I changed vstrExchangeMailBox to be my colleague's alias. Ask the colleague to execute the same asp file on his machine (the asp is still on my localserver). I am expecting the help@company.com will get an email from my colleague. But not, he got such error msg:
found err: -2147221231 The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]


Does anybody know what is wrong ? thanks

Yuli
 
See if this help:


user.gif

There's never time to do it right, but there's always time to do it over!

-TonyU
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top