I'm using the following vbs to auto send an email but I get a popup saying that an application is trying to send an email from my account. Of course this is to be expected but is there a way to turn off this popup either through Outlook to let applications send on my behalf or through the vbs to dynamically handle the popup? Maybe an API get foreground window then close if the right window?
You can use the below code to send emails.Its not displaying any popups.
Const cdoSendUsingPort = 2
strSmartHost = "<your mail host>" ' Your Email Server
Set iMsg = CreateObject("CDO.Message")
Set iConf = iMsg.Configuration
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
iConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
iMsg.To = "firstname.lastname@example.org"
iMsg.From = "Test"
iMsg.Subject = "This is subject"
'iMsg.TextBody = aBody
iMsg.HTMLBody = "This is body of the message"