title: Using a VBScript to send an email through Outlook
body: <p>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.</p>
  
  <pre><code>Set objOutlook = CreateObject("Outlook.Application")
  Set objMail = objOutlook.CreateItem(0)
  objMail.Display   'To display message
  objMail.Recipients.Add ("address@example.com")
  objMail.Subject = "Mail Subject"
  objMail.Body = "This is Email Body"
  objMail.Send
  objOutlook.Quit
  Set objMail = Nothing
  Set objOutlook = Nothing
  </code></pre>
  
  <p>All the information is entered into the email correctly. However, once the send command is executed, the message is put into the outbox and never sent unless Outlook is opened manually after the fact. Is there a methodology I could use to perhaps run a Send/Recieve before it ends the script? Or a delay that would keep the Outlook process alive for it to actually Send?</p>
  
  <p>I cant seem to think of anything so all help is appreciated.</p>
  
  <p>Thanks</p>