Hello,
I am using the folowing vbscript to send email. It works fine only when the outlook is open in the machine, the operation is aborted when the outlook is closed. Any suggestion on it? I thought the script should start outlook by itself if it is not running.
Set MyApp = CreateObject("Outlook.Application")
Set MyItem = MyApp.CreateItem(0) 'olMailItem
With MyItem
.To = "a@b.c"
.Subject = "Subject"
.ReadReceiptRequested = False
.HTMLBody = "Message<BR>Line 2"
End With
MyItem.Send
Thanks for your help!
I am using the folowing vbscript to send email. It works fine only when the outlook is open in the machine, the operation is aborted when the outlook is closed. Any suggestion on it? I thought the script should start outlook by itself if it is not running.
Set MyApp = CreateObject("Outlook.Application")
Set MyItem = MyApp.CreateItem(0) 'olMailItem
With MyItem
.To = "a@b.c"
.Subject = "Subject"
.ReadReceiptRequested = False
.HTMLBody = "Message<BR>Line 2"
End With
MyItem.Send
Thanks for your help!