好吧我只是使用windows powershell,python 3.4和smtp库。我是否需要设置其他任何内容来解决此错误?谷歌搜索就像一个疯子,似乎无法找到一个可以指向正确方向的答案。提前致谢。
>>> s=smtplib.SMTP("localhost")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Z:\Python34\lib\smtplib.py", line 242, in __init__
(code, msg) = self.connect(host, port)
File "Z:\Python34\lib\smtplib.py", line 321, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "Z:\Python34\lib\smtplib.py", line 292, in _get_socket
self.source_address)
File "Z:\Python34\lib\socket.py", line 509, in create_connection
raise err
File "Z:\Python34\lib\socket.py", line 500, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it