Django`send_mail`错误

时间:2018-06-05 15:27:26

标签: django-views

我在Centos7上使用了send_mail和Django。无论我尝试什么,它都会报告以下错误:

File "/usr/local/python3/lib/python3.6/smtplib.py", line 336, in connect
    self.sock = self._get_socket(host, port, self.timeout)
File "/usr/local/python3/lib/python3.6/smtplib.py", line 307, in _get_socket
    self.source_address)
File "/usr/local/python3/lib/python3.6/socket.py", line 704, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/local/python3/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 
socket.gaierror: [Errno -2] Name or service not known
[05/Jun/2018 22:52:36] "POST /users/register/ HTTP/1.1" 500 124777

有人能告诉我原因吗?谢谢!

0 个答案:

没有答案
相关问题