title: Amazon SES SMTP Python Usage
body: <p>I am trying to diagnose why sending email through Amazon SES is not working via python.</p>
  
  <p>The following example demonstrates the problem, where <code>user</code> and <code>pass</code> are set to the appropriate credentials.</p>
  
  <pre><code>&gt;&gt;&gt; import smtplib
  &gt;&gt;&gt; s = smtplib.SMTP_SSL("email-smtp.us-east-1.amazonaws.com", 465)
  &gt;&gt;&gt; s.login(user, pw)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/lib/python2.6/smtplib.py", line 549, in login
      self.ehlo_or_helo_if_needed()
    File "/usr/lib/python2.6/smtplib.py", line 510, in ehlo_or_helo_if_needed
      (code, resp) = self.helo()
    File "/usr/lib/python2.6/smtplib.py", line 372, in helo
      (code,msg)=self.getreply()
    File "/usr/lib/python2.6/smtplib.py", line 340, in getreply
      raise SMTPServerDisconnected("Connection unexpectedly closed")
  smtplib.SMTPServerDisconnected: Connection unexpectedly closed
  </code></pre>
  
  <p>This message is not particularly useful, and have tried other vraiations, but can't seem to get it to work.</p>
  
  <p>I can send email using my thunderbird email client with these settings, so my assumption is that I am mission something TLS-related.</p>