title: Django 1.8 & Gmail - SMTPAuthenticationError Username and Password not accepted
body: <p>I'm really not sure what I've done wrong.</p>
  
  <p>Settings:</p>
  
  <pre><code>EMAIL_HOST = 'smtp.gmail.com'
  EMAIL_HOST_USER = 'email_address@gmail.com'
  EMAIL_HOST_PASSWORD = '**********'
  EMAIL_PORT = 587
  EMAIL_USE_TLS = True
  </code></pre>
  
  <p>In <code>python manage.py shell</code>:</p>
  
  <pre><code>import django
  from django.conf import settings
  from django.core.mail import send_mail
  send_mail('test', 'content', settings.EMAIL_HOST_USER, ['myemail@gmail.com'], fail_silently=False)
  </code></pre>
  
  <p>And I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;console&gt;", line 1, in &lt;module&gt;
  File "C:\Python34\lib\site-packages\django\core\mail\__init__.py", line 62, in send_mail
  return mail.send()
  File "C:\Python34\lib\site-packages\django\core\mail\message.py", line 303, in send
  return self.get_connection(fail_silently).send_messages([self])
  File "C:\Python34\lib\site-packages\django\core\mail\backends\smtp.py", line 100, in send_messages
  new_conn_created = self.open()
  File "C:\Python34\lib\site-packages\django\core\mail\backends\smtp.py", line 67, in open
  self.connection.login(self.username, self.password)
  File "C:\Python34\lib\smtplib.py", line 652, in login
  raise SMTPAuthenticationError(code, resp)
  smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/answer/14257by17sm25608295wib.18 - gsmtp')
  </code></pre>
  
  <ul>
  <li>I've tried <a href="http://www.google.com/accounts/DisplayUnlockCaptcha" rel="nofollow">http://www.google.com/accounts/DisplayUnlockCaptcha</a>.</li>
  <li>I've set it to <a href="https://support.google.com/accounts/answer/6010255?vid=1-635755814963531983-2694181562665504860" rel="nofollow">allow less secure apps access</a>.</li>
  <li>Google considers the password as secure.</li>
  <li>2 Step Verification is not enabled.</li>
  </ul>
  
  <p>Have I missed something?</p>