Dear All;
I am using VB.NET 2003 and I am using following code to send emails using Outlook object. When its sending email Outlook prompts a popup of security alert and Ask user to you want to allow to send that email and I can selected check box to allow and selected minutes how long the user will have access to send email using outlook. After selecting Yes, it gives another prompt which and there are option to select yes or no for further time.
I want to stop that prompt, b/c it is pretty annoying for user b/c I have to send emails to so many recipient at the click on one button. How can I stop that prompt to pop up?
Private Function SendEmail(ByVal sendTo As String)
Dim Counter As Integer
Dim oNewMail As Outlook.MailItem
Dim objOLApp As Outlook.Application
Dim oAttachment
Dim x As Short
Try
objOLApp = New Outlook.Application
oNewMail = objOLApp.CreateItem(Outlook.OlItemType.olMailItem)
With oNewMail
.Subject = "New Report Available"
.Body = "New reporting information has Posted"
.BodyFormat = Outlook.OlBodyFormat.olFormatRichText
.Recipients.Add(sendTo)
.Send()
End With
oNewMail = Nothing
objOLApp = Nothing
Catch myexp As Exception
MsgBox(myexp.Message, MsgBoxStyle.Critical, STR_VALIDATION)
End Try
End Function
I am using VB.NET 2003 and I am using following code to send emails using Outlook object. When its sending email Outlook prompts a popup of security alert and Ask user to you want to allow to send that email and I can selected check box to allow and selected minutes how long the user will have access to send email using outlook. After selecting Yes, it gives another prompt which and there are option to select yes or no for further time.
I want to stop that prompt, b/c it is pretty annoying for user b/c I have to send emails to so many recipient at the click on one button. How can I stop that prompt to pop up?
Private Function SendEmail(ByVal sendTo As String)
Dim Counter As Integer
Dim oNewMail As Outlook.MailItem
Dim objOLApp As Outlook.Application
Dim oAttachment
Dim x As Short
Try
objOLApp = New Outlook.Application
oNewMail = objOLApp.CreateItem(Outlook.OlItemType.olMailItem)
With oNewMail
.Subject = "New Report Available"
.Body = "New reporting information has Posted"
.BodyFormat = Outlook.OlBodyFormat.olFormatRichText
.Recipients.Add(sendTo)
.Send()
End With
oNewMail = Nothing
objOLApp = Nothing
Catch myexp As Exception
MsgBox(myexp.Message, MsgBoxStyle.Critical, STR_VALIDATION)
End Try
End Function