(django)[Errno 11001] getaddrinfo失败了

时间:2017-12-13 19:10:39

标签: django

我的代码有什么问题?

在settings.py

EMAIL_HOST = 'smtp.mail.********.info'
EMAIL_HOST_USER = 'mail@*********.info'
EMAIL_HOST_PASSWORD = '*********'
EMAIL_PORT = 465
EMAIL_USE_TLS = True

CORS_ORIGIN_ALLOW_ALL=True
APPEND_SLASH= False
在views.py中

send_mail('hello', 'pesanan.', 'noreply@server.info', ['arnoldfox21@gmail.com'])

我收到以下错误消息

    gaierror at /form-pemesanan-suplier/
[Errno 11001] getaddrinfo failed
Request Method: POST
Request URL:    http://127.0.0.1:8000/form-pemesanan-suplier/
Django Version: 1.11.7
Exception Type: gaierror
Exception Value:    
[Errno 11001] getaddrinfo failed
Exception Location: C:\Python27\Lib\socket.py in create_connection, line 557
Python Executable:  C:\Users\kurniawan\Envs\myproject\Scripts\python.exe
Python Version: 2.7.14

0 个答案:

没有答案