title: programmatically send outlook email from shared mailbox
body: <p>I'm trying to send an email with python from a shared mailbox.</p>
  
  <p>I have been able to sucessfuly send it through my own email, but sending one with a shared mailbox (that I have tested that I have access too) is giving me issues.</p>
  
  <p>Code used for email script in python </p>
  
  <pre><code>import win32com.client
  import win32com
  olMailItem = 0x0
  obj = win32com.client.Dispatch("Outlook.Application")
  newMail = obj.CreateItem(olMailItem)
  newMail.Subject = "Python Email Test"
  newMail.Body = "Test"
  newMail.To = 'hi@hi.com'
  newMail.Send()
  </code></pre>
  
  <p>I know that below is how I can read my emails from a shared Folder.
      <code>
      outlook = win32com.Dispatch("Outlook.Application").GetNamespace("MAPI")
      dir_accounts = outlook.Folders("SharedFolder")
  </code></p>
  
  <p>Any ideas on how to combine these?</p>