Scheduled Task to run VB Script - send email
Posted on 2005-03-29
I have the following code created as .VBS file and I set the scheduled task to run this weekly.
However, as I'm running this off my laptop where my outlook prompts me to connect or not.
Thus when this starts running - it'll gives me the outlook prompt and then it has the another prompt to ask "A program is trying to send an email on your behalf. Do you want to aloow this?"
Is there any way I make the code to skip both of the prompts?
"Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
myItem.To = "email@example.com"
myItem.Subject = "Message for you sir!"
myItem.Body = "Body here."
Thanks, any help would be appreciated.