title: Unable to send mail through outlook using Python
body: <p>I am using the below code to send email with an attachment using python. I using the outlook application itselt(not via backend)</p>
  
  <pre><code>from time import sleep
  
  import win32com.client as win32
  
  outlook = win32.Dispatch('outlook.application')
  mail = outlook.CreateItem(0)
  mail.To = "EMAIL ADDRESS"
  mail.Subject = "Subject"
  mail.HtmlBody = "HTML Body"
  mail.Attachments.Add("folderName\\output.zip")
  mail.Display(True)
  sleep(1)
  mail.Send()
  </code></pre>
  
  <p>Its working fine till the line mail.Display(True).  I can see the outlook new mail window open with everything typed in and also file attached. But the next statement mail.send() is giving error :</p>
  
  <pre><code>Traceback (most recent call last):   File "C:/Users/username/PycharmProjects/001.PySelenium/win32email.py", line 16, in &lt;module&gt;
      mail.send()   File "C:\Users\username\PycharmProjects\001.PySelenium\venv\lib\site-packages\win32com\client\dynamic.py", line 516, in __getattr__
      ret = self._oleobj_.Invoke(retEntry.dispid,0,invoke_type,1) pywintypes.com_error: (-2147467260, 'Operation aborted', None, None)
  </code></pre>
  
  <h2>Debug Screenshot :</h2>
  
  <p><a href="https://i.stack.imgur.com/X30Jn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X30Jn.png" alt="enter image description here"></a></p>