0

whats wrong with my code?

in 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

in views.py

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

I get the following error message

    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
  • `EMAIL_HOST` cannot be looked up. Check DNS to ensure host exists/is correct, and that your server can do remote DNS lookups. – Blue Dec 13 '17 at 19:13

0 Answers0