0
它在我的settings.py:Django的:配置电子邮件
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.yahoo.fr'
EMAIL_PORT = 25
EMAIL_HOST_USER = "[email protected]"
DEFAULT_FROM_EMAIL = "[email protected]"
我的命令:
from django.core.mail import send_mail
send_mail('sss','hhh','[email protected]',['[email protected]'])
错误:
...
error: [Errno 111] Connection refused
为什么? 我不确定我是否配置好了我的settings.py,如果你能帮我解决这个问题的话。
THANK YOU!我添加了这个,我配置了我的Gmail帐户的应用程序密码,它的工作原理!但是现在我对使用'send_mail'的系统有一个很大的问题,我在这里解释一下:http://stackoverflow.com/questions/33702434/send-mail-to-user-for-password-reset – Zoulou