Outlook warning dialogue

obrien.james

Member
Joined
Sep 11, 2009
Messages
15
Programming Experience
Beginner
Hi,

I am making a application that automatically sends out emails to a list of addresses from a database.

I need to use outlook as the email server is a exchange server and i am not allowed to directly connect using the SMTP details.

When i try to send each email i get a warning dialogue where i have to click yes. I need to avoid this as i will be sending out multiple emails in one go.

Below is the code im using:

Dim oApp As Outlook.Application
oApp = New Outlook.Application
'Create the message item
Dim oMsg As Outlook.MailItem
oMsg = oApp.CreateItem(OlItemType.olMailItem)
oMsg.Subject = "SUBJECT"
oMsg.Body = "SOME MESSAGE"
oMsg.To = "EMAIL@Address"

'send the messge

oMsg.Send()


Any help would be greatly appreciated

James
 
Back
Top