I am trying to send E-Mail from Attachmate, without the nuisance of being asked all the questions. I need to run scripts from a stand alone system (without operator intervention) using the Windows' Scheduler, which works fine, but would like to receive E-Mail when the tasks are completed.
The E-Mail code I have gotten from other questions answered causes the questions "A program is trying to access Email addresses you have stored in Outlook. Do you want to allow this?", and "A program is trying to automatically send e-mail on your behalf. Do you want to allow this?". Is there anyway to turn these questions off?
The code I am using (in its simplest form) is:
Sub Main
Dim myOlApp As Object, _
myItem As Object
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
myItem.Recipients.Add "My.Name@company.org"
myItem.Subject = "Test e-mail from script"
myItem.Body = "This is the message body."
myItem.Send
Close
End Sub
The E-Mail code I have gotten from other questions answered causes the questions "A program is trying to access Email addresses you have stored in Outlook. Do you want to allow this?", and "A program is trying to automatically send e-mail on your behalf. Do you want to allow this?". Is there anyway to turn these questions off?
The code I am using (in its simplest form) is:
Sub Main
Dim myOlApp As Object, _
myItem As Object
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
myItem.Recipients.Add "My.Name@company.org"
myItem.Subject = "Test e-mail from script"
myItem.Body = "This is the message body."
myItem.Send
Close
End Sub