======================================
Traceback (most recent call last):
File "D:/soft/test.py", line 140, in <module>
main_runnow()
File "D:/soft/test.py", line 133, in main_runnow
sendmail(str(disk_free),files)
File "D:/soft/test.py", line 42, in sendmail
smtp = smtplib.SMTP_SSL("smtp.163.com",994) #实例化smtp服务器
File "C:\Python38\lib\smtplib.py", line 1043, in __init__
SMTP.__init__(self, host, port, local_hostname, timeout,
File "C:\Python38\lib\smtplib.py", line 255, in __init__
(code, msg) = self.connect(host, port)
File "C:\Python38\lib\smtplib.py", line 339, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "C:\Python38\lib\smtplib.py", line 1049, in _get_socket
new_socket = socket.create_connection((host, port), timeout,
File "C:\Python38\lib\socket.py", line 787, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "C:\Python38\lib\socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11004] getaddrinfo failed
======================================
可能做了设置,不能访问某些网站IP等。
比如不能访问 smtp.163.com
======================================