title: gaierror [Errno 8] when send_mail with Django python and gmail
body: <p>I'm new with Django an Python.
  I was following this tutorial <a href="https://www.youtube.com/watch?v=51mmqf5a0Ss">"Try Django 16"</a>
  I don't get it work. I added <code>fail_silent=false</code> to get the error.</p>
  
  <pre><code>[Errno 8] nodename nor servname provided, or not known
  </code></pre>
  
  <p>Is there anyone who can help me find this problem?</p>
  
  <pre><code>gaierror at /thank-you/
  [Errno 8] nodename nor servname provided, or not known
  Request Method: POST
  Request URL:    http://127.0.0.1:8000/thank-you/
  Django Version: 1.6.5
  Exception Type: gaierror
  Exception Value:    
  [Errno 8] nodename nor servname provided, or not known
  Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py in create_connection, line 553
  Python Executable:  /usr/bin/python
  Python Version: 2.7.5
  Python Path:    
  ['/Users/andremensink/Desktop/skillshare/src',
   '/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
   '/Library/Python/2.7/site-packages']
  Server time:    Sat, 28 Jun 2014 13:23:10 +0000
  
  
  
  
  Environment:
  
  
  Request Method: POST
  Request URL: http://127.0.0.1:8000/thank-you/
  
  Django Version: 1.6.5
  Python Version: 2.7.5
  Installed Applications:
  ('django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'south',
   'signups')
  Installed Middleware:
  ('django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware')
  Traceback:
  File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in get_response
    112.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/andremensink/Desktop/skillshare/src/signups/views.py" in thankyou
    40.         send_mail(subject,message,from_email,to_list,fail_silently=False)
  File "/Library/Python/2.7/site-packages/django/core/mail/__init__.py" in send_mail
    50.                         connection=connection).send()
  File "/Library/Python/2.7/site-packages/django/core/mail/message.py" in send
    274.         return self.get_connection(fail_silently).send_messages([self])
  File "/Library/Python/2.7/site-packages/django/core/mail/backends/smtp.py" in send_messages
    87.             new_conn_created = self.open()
  File "/Library/Python/2.7/site-packages/django/core/mail/backends/smtp.py" in open
    48.                                            local_hostname=DNS_NAME.get_fqdn())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py" in __init__
    250.             (code, msg) = self.connect(host, port)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py" in connect
    310.         self.sock = self._get_socket(host, port, self.timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py" in _get_socket
    285.         return socket.create_connection((host, port), timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py" in create_connection
    553.     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  
  Exception Type: gaierror at /thank-you/
  Exception Value: [Errno 8] nodename nor servname provided, or not known
  </code></pre>
  
  <p>The code in python is:</p>
  
  <pre><code>#--django stuff
  from django.conf import settings
  from django.contrib import messages
  from django.core.mail import send_mail #EmailMessage#send_mail
  from django.shortcuts import render, render_to_response, RequestContext, HttpResponsePermanentRedirect
  
      subject = 'This is the subject'
      message = 'Welcome to the list and enjoy your product.\n This is the message.'
      from_email = settings.EMAIL_HOST_USER
      to_list = [save_it.email,settings.EMAIL_HOST_USER]
      send_mail(subject,message,from_email,to_list,fail_silently=False)    
  </code></pre>
  
  <p>in the settings is defined:</p>
  
  <pre><code>#for gmail or google apps
  EMAIL_USE_TLS = True
  EMAIL_HOST = 'smpt.gmail.com'
  EMAIL_HOST_USER = 'mymail@gmail.com'
  EMAIL_HOST_PASSWORD = 'password'
  EMAIL_PORT = 587
  ACCOUNT_EMAIL_VERIFICATION = 'none'
  </code></pre>