title: Django Sending Email : SMTPServerDisconnected: Connection unexpectedly closed
body: <p>hello i want to sending email activation use django registration redux.</p>
  <p>this is my setting.py</p>
  <pre><code>EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  
  ACCOUNT_ACTIVATION_DAYS = 3
  EMAIL_HOST = 'smtp.gmail.com'
  EMAIL_HOST_USER = 'blahblah@gmail.com'
  EMAIL_HOST_PASSWORD = 'blahpassword'
  EMAIL_PORT = 465
  EMAIL_USE_SSL = True
  
  LOGIN_REDIRECT_URL = '/'
  </code></pre>
  <p>when i try with</p>
  <blockquote>
  <p>python manage.py shell</p>
  <p>from django.core.mail import send_mail</p>
  <p>send_mail('Test', 'This is a test', 'youremail@gmail.com', ['toemail@gmail.com'])</p>
  </blockquote>
  <p>i am getting error like this:</p>
  <pre><code>    Traceback (most recent call last):
    File &quot;&lt;console&gt;&quot;, line 1, in &lt;module&gt;
    File &quot;/home/apsijogja/djangogirls/myvenv/local/lib/python2.7/site-packages/django/core/mail/__init__.py&quot;, line 62, in send_mail
      return mail.send()
    File &quot;/home/apsijogja/djangogirls/myvenv/local/lib/python2.7/site-packages/django/core/mail/message.py&quot;, line 286, in send
      return self.get_connection(fail_silently).send_messages([self])
    File &quot;/home/apsijogja/djangogirls/myvenv/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py&quot;, line 92, in send_messages
      new_conn_created = self.open()
    File &quot;/home/apsijogja/djangogirls/myvenv/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py&quot;, line 50, in open
      self.connection = connection_class(self.host, self.port, **connection_params)
    File &quot;/usr/lib/python2.7/smtplib.py&quot;, line 249, in __init__
      (code, msg) = self.connect(host, port)
    File &quot;/usr/lib/python2.7/smtplib.py&quot;, line 310, in connect
      (code, msg) = self.getreply()
    File &quot;/usr/lib/python2.7/smtplib.py&quot;, line 361, in getreply
      raise SMTPServerDisconnected(&quot;Connection unexpectedly closed&quot;)
  SMTPServerDisconnected: Connection unexpectedly closed
  </code></pre>
  <p>can you help me solve this problem?</p>