title: "Connection Unexpectedly Closed" SMTP Gmail Python 3
body: <p>Wondering whether anyone has any ideas on this? </p>
  
  <p>When I run the following script it always creates the handshake with the SMTP and then cancels mid-process with the error "SMTPServerDisconnected: Connection unexpectedly closed"?</p>
  
  <pre><code>##Email addresses for sender and recpient are correct when in use.
  
  import smtplib
  
  smtpObj = smtplib.SMTP('smtp.gmail.com', 465)
  smtpObj.ehlo()
  smtpObj.login('###########@gmail.com', '#Password')
  smtpObj.sendmail('#########@gmail.com', '#########@gmail.com', 'Subject: 
  Test.')
  
  smtpObj.quit()
  ##Connection end
  </code></pre>
  
  <p>Any ideas or thoughts would be much appreciated, thanks in advance! :)</p>