Pat,
I have been dealing with this since it is due to the security patch that is
in Outlook. click yes is a down and dirty way to get around it. There is a
way to use VB to by-pass Outlook all together, but if you want to keep a copy
of the email for your records, you will have to email it back to yourself.
The code is as follows:
Public Sub Send_BATCH_Mail(FromEmail, SendTo, CCTo, Subject, Body, Attachment)
'***************************************************************************************************
' This Function Is Created in order to solve the Ms-Outlook problem which
' Prompt user’s confirmation during Batch e-mail process. The source of
the problem is
' the Microsoft security Update
'***************************************************************************************************
' test To Use CDO (Microsoft's Collaboration Data Objects ) instead of
outlook object
Dim imsg, iconf
Set imsg = CreateObject("CDO.Message")
Set iconf = CreateObject("CDO.Configuration")
If Attachment <> "" Then ' Include attachment if applicable.
'Set myAttachments = objMail.Attachments
imsg.AddAttachment Attachment
'myAttachments.Add Attachment, olByValue, 1, "Candidate Activity
Report"
End If
imsg.From = FromEmail
imsg.To = SendTo
imsg.CC = CCTo
imsg.Subject = Subject
imsg.TextBody = Body
iconf.Fields.Item("
http://schemas.microsoft.com/cdo/configuration/sendusing")
= 2
iconf.Fields.Item("
http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail1.aegonusa.com"
iconf.Fields.Item("
http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
iconf.Fields.Item("
http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0
iconf.Fields.Update
Set imsg.Configuration = iconf
imsg.Send
End Sub