title: gaierror, [Errno 11001] getaddrinfo failed in django
body: <p>I am trying to send mail from Django to Gmail but I am getting <code>gaierror</code> in my browser when I run my server</p>
  
  <p><img src="https://i.stack.imgur.com/zFsed.png" alt="gaierror"></p>
  
  <p>Here is my <em>views.py</em> code</p>
  
  <pre><code>from django.shortcuts import render
  from django.core.mail import send_mail
  def mail(request):
      subject = "Real programmer contact"
      msg = "Congratulations for your success"
      to = "mail@example.org"
      res = send_mail(subject, msg, 'example@gmail.com', [to])
      if(res == 1):
          msg = "Mail Sent"
      else:
          msg = "Mail could not sent"
      return render(request, 'testapp/index.html',{'msg':msg})
  </code></pre>
  
  <p>Here is the <em>settings.py</em> code </p>
  
  <pre><code>EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  EMAIL_HOST = 'smtp.gamil.com'
  EMAIL_USE_TLS = True
  EMAIL_PORT = 587
  EMAIL_HOST_USER = 'example@gmail.com'
  EMAIL_HOST_PASSWORD = 'example'
  </code></pre>
  
  <p>Here is the HTML code </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en" dir="ltr"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;mail box&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      {{msg}}
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and lastly here is the <em>urls.py</em></p>
  
  <pre><code>path('mail/',views.mail),
  </code></pre>
  
  <p>I am not able to resolve this problem.</p>