Using a VBScript to send an email through Outlook
I've recently wrote a VBScript to send an email using Outlook. Everything works great untill it gets to the sending point. I'm assuming since it only opens a single message, and since the message was sent... the Window closes and Outlook is killed. Set objOutlook = CreateObject("Outlook.Application") Set objMail = objOutlook.CreateItem(0) objMail.Display 'To display message objMail.Recipients.Add ("[email protected]") objMail.Subject = "Mail Subject" objMail.Body = "This is Email Body" objMail.Send objOutlook.Quit Set objMail = Nothing Set objOutlook = Nothing All the information is entered
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.