Hi All,
I'm trying to interact with our exchange server from within a VB client program. The VB App needs to send a mass mailing to our internal staff. When a button it clicked on the app, it checks the SQL Database and determins who should get this email.
My problem is I keep getting this error from VB:
You do not have permission to log on. [Microsoft Exchange Server Information Store - [MAPI_E_FAILONEPROVIDER(8004011D)]]
The code I'm trying to execute is below and the error happends where it says HERE->. Is there an easy way to send MAPI mail through an specificed account on our exchange server through VB?
------------------------------------------------------
Dim objSession, oInbox, colMessages, oMessage, colRecipients
Dim strServer, strMyMailbox, strProfileInfo
Set objSession = CreateObject("MAPI.Session"
strServer = "CUEXCHANGE"
strMyMailbox = "IUSR_CUNETIISERVER"
strProfileInfo = strServer & vbLf & strMyMailbox
objSession.Logon "IUSR_CUNETIISERVER", "123456", False, True, 0, True, strProfileInfo
Set oInbox = objSession.Inbox
HERE-> Set colMessages = oInbox.Messages
Set oMessage = colMessages.Add()
Set colRecipients = oMessage.Recipients
colRecipients.Add recipient
colRecipients.Resolve
oMessage.subject = subject
oMessage.Text = msg
oMessage.Send
objSession.Logoff
Set objSession = Nothing
I'm trying to interact with our exchange server from within a VB client program. The VB App needs to send a mass mailing to our internal staff. When a button it clicked on the app, it checks the SQL Database and determins who should get this email.
My problem is I keep getting this error from VB:
You do not have permission to log on. [Microsoft Exchange Server Information Store - [MAPI_E_FAILONEPROVIDER(8004011D)]]
The code I'm trying to execute is below and the error happends where it says HERE->. Is there an easy way to send MAPI mail through an specificed account on our exchange server through VB?
------------------------------------------------------
Dim objSession, oInbox, colMessages, oMessage, colRecipients
Dim strServer, strMyMailbox, strProfileInfo
Set objSession = CreateObject("MAPI.Session"
strServer = "CUEXCHANGE"
strMyMailbox = "IUSR_CUNETIISERVER"
strProfileInfo = strServer & vbLf & strMyMailbox
objSession.Logon "IUSR_CUNETIISERVER", "123456", False, True, 0, True, strProfileInfo
Set oInbox = objSession.Inbox
HERE-> Set colMessages = oInbox.Messages
Set oMessage = colMessages.Add()
Set colRecipients = oMessage.Recipients
colRecipients.Add recipient
colRecipients.Resolve
oMessage.subject = subject
oMessage.Text = msg
oMessage.Send
objSession.Logoff
Set objSession = Nothing