title: Python Error: 5.7.0 must issue a starttls command first
body: <p>I try to send an email with my python script, but I got the error message:</p>
  
  <pre><code>5.7.0 must issue a starttls command first
  </code></pre>
  
  <p>I'm using <code>smtplib</code> and this is my code:</p>
  
  <pre><code>import smtplib
  
  sender = 'from@fromdomain.com'
  receivers = 'to@todomain.com'
  
  message = """From: From Person &lt;from@fromdomain.com&gt;
  To: To Person &lt;to@todomain.com&gt;
  Subject: SMTP e-mail test
  
  This is a test e-mail message.
  """
  
  try:
      smtpObj = smtplib.SMTP('smtp.gmail.com')
      smtpObj.sendmail(sender, receivers, message)         
      print "Successfully sent email"
  except Exception,e:
      print str(e)
  </code></pre>
  
  <p>If some one have an idea about how to solve this error I'll be grateful.</p>