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
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