0

It's in my settings.py :

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.yahoo.fr'
EMAIL_PORT = 25
EMAIL_HOST_USER = "myusername@yahoo.fr"
DEFAULT_FROM_EMAIL = "myusername@yahoo.fr"

My commands:

from django.core.mail import send_mail
send_mail('sss','hhh','myusername@outlook.fr',['myusername@yahoo.fr'])

The error:

...
error: [Errno 111] Connection refused

Why? I'm not sure that I have good configured my settings.py, if you can also help me for this.

rebatoma
  • 734
  • 1
  • 17
  • 32
Zoulou
  • 303
  • 2
  • 16

1 Answers1

0

You haven't added the email password to settings.py

EMAIL_HOST_PASSWORD = 'my email account password'
utkbansal
  • 2,787
  • 2
  • 26
  • 47
  • THANK YOU ! I have added this, and I configure the application password of my Gmail account and it's works ! But now I have a very big problem with my system using 'send_mail', I explain this here : http://stackoverflow.com/questions/33702434/send-mail-to-user-for-password-reset – Zoulou Nov 14 '15 at 10:35