title: How to send an email with Gmail as provider using Python?
body: <p>I am trying to send email (Gmail) using python, but I am getting following error.</p>
  
  <pre><code>Traceback (most recent call last):  
  File "emailSend.py", line 14, in &lt;module&gt;  
  server.login(username,password)  
  File "/usr/lib/python2.5/smtplib.py", line 554, in login  
  raise SMTPException("SMTP AUTH extension not supported by server.")  
  smtplib.SMTPException: SMTP AUTH extension not supported by server.
  </code></pre>
  
  <p>The Python script is the following.</p>
  
  <pre><code>import smtplib
  fromaddr = 'user_me@gmail.com'
  toaddrs  = 'user_you@gmail.com'
  msg = 'Why,Oh why!'
  username = 'user_me@gmail.com'
  password = 'pwd'
  server = smtplib.SMTP('smtp.gmail.com:587')
  server.starttls()
  server.login(username,password)
  server.sendmail(fromaddr, toaddrs, msg)
  server.quit()
  </code></pre>