title: gaierror: [Errno -3] Temporary failure in name resolution while sending outlook email python
body: <p>I am trying to send an outlook email in python.But I am getting this error.I tried using win 32 and many other ways but none of them work and I am unsure of the problem.</p>
  
  <pre><code>import smtplib
  from email.mime.multipart import MIMEMultipart
  from email.mime.text import MIMEText 
  
  
  fromaddr = "anc@abc.com"
  toaddr = "abc@abc.com"
  msg = MIMEMultipart()
  msg['From'] = fromaddr
  msg['To'] = toaddr
  msg['Subject'] = "datalerty"
  
  body = "sample"
  msg.attach(MIMEText(body, 'plain'))
  
  server = smtplib.SMTP('smtp-mail.outlook.com',587)
  server.starttls()
  server.login(fromaddr, "abc")
  text = msg.as_string()
  server.sendmail(fromaddr, toaddr, text)
  server.quit()
  </code></pre>