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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error using MAPI (without forms): Unknown recipient #32014 1

Status
Not open for further replies.

Brawn

Programmer
Jul 5, 2001
73
CA
Hi,

I'm developing a WebClass application. I want information to be mailed at a point in the application from the server to a particular address. I've tried everything (everything I could think of). Here is what I have so far.

* This is a WebClass application so there are no "Forms" or pre-made or determined objects. I created the MAPI controls using CreateObject(). I can not have any other interfaces pop up (like a prompt for a username or password). Mailing an email is the only mailing functionality I need (and to only one address). No managing of email, reading email or sending attachments.

Error Raised: mapUnknownRecipient 32014 "Unknown recipient"
'-----------------------------------------------
'>The email address I use is valid
'>The password I use is valid

Dim mailSession As Object
Dim mail As Object
Set mailSession = CreateObject("MSMAPI.MAPISession", "")
Set mail = CreateObject("MSMAPI.MAPIMessages", "")

On Error GoTo ErrorHandler
mailSession.UserName = "aUser"
mailSession.Password = "pass"
mailSession.NewSession = False
mailSession.DownLoadMail = False
mailSession.LogonUI = False

mailSession.SignOn
mail.sessionid = mailSession.sessionid
mail.Compose
mail.RecipDisplayName = "someone"
mail.RecipAddress = "someone@work.com"
mail.MsgSubject = "Hi"
mail.MsgNoteText = "Please help me"
mail.ResolveName
mail.Send False
mailSession.SignOff
Exit Sub
ErrorHandler:
Err.Raise Err.Number, Err.source, Err.Description


Thanks, Brawn
 
AnyOne?... (I'm really stuck):cool: Brawn
 

mail.ResolveName will cause this if the recipient does not exist. Peter Meachem
peter@accuflight.com
 
Thanks,

That was the line that was throwing the error, but I didn't know why because the recipient (address mailing to?) did exist.

My computer eventually froze up. Netscape was throwing errors in the back ground (though it wasn't running) and the messages where behind all my other windows.

The Error:

The recipient did exist, but the mail setup was not configured in Netscape Messenger. I thought having Outlook Express setup would be enouph.


How does MAPI or my application know what messaging app to use?

Thanks again, :)I Brawn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top