title: configuring django to send email via the microsoft live smtp server
body: <p>I've signed up in Microsoft live SMTP server and created an email for my django app to send mail from my domain. But the problem is these configurations doesn't work and I can not send email from my django app running on local host to another email address. What's wrong? This is my code:</p>
  
  <pre><code>#Settings.py
  # Email Server config
  DEFAULT_FROM_EMAIL = 'Hamid FzM &lt;hamidfzm@example.com&gt;'
  EMAIL_HOST = 'smtp.live.com'
  EMAIL_PORT = 587
  EMAIL_USE_TLS = True
  EMAIL_HOST_USER = 'hamidfzm@example.com'
  EMAIL_HOST_PASSWORD = 'something'
  </code></pre>
  
  <p>For testing purpose each time I visit <code>127.0.0.1/test/</code> an email will be send to my account by calling this function</p>
  
  <pre><code>#views
  def test(request):
      from django.core.mail import EmailMessage
      EmailMessage('Test', 'This is body', to=['other@example.com'])
  </code></pre>