title: Python, SMTP Error, socket.gaierror: [Errno -2] Name or service not known, smtp.gmail.com
body: <pre><code>server = smtplib.SMTP('smtp.gmail.com', 587)
  server.starttls()
  server.login('email@gmail.com','password')
  
  msg = 'Hello World'
  server.sendmail('email@gmail.com','email@gmail.com',msg)
  server.quit()
  </code></pre>
  
  <p>I'm getting a <code>socket.gaierror: [Errno -2] Name or service not known</code> for the first line <code>server = smtplib.SMTP('smtp.google.com', 587)</code>. Trying <code>stmp.office365.com</code> seems to go through fine but gmail is not recognized. </p>