Answer the question
In order to leave comments, you need to log in
Socket.gaierror: [Errno 11003] getaddrinfo failed, what to do?
Wrote a simple code
import smtplib
from email.mime.text import MIMEText
server = smtplib.SMTP('[email protected]', 587)
# server.set_debuglevel(True)
try:
dhellmann_result = server.verify('dhellmann')
notthere_result = server.verify('notthere')
finally:
server.quit()
print('dhellmann :', dhellmann_result)
print('notthere :', notthere_result)
Traceback (most recent call last):
File "C:\Users\1289727\OneDrive\Рабочий стол\test.py", line 5, in <module>
server = smtplib.SMTP('[email protected]', 587)
File "C:\Users\1289727\AppData\Local\Programs\Python\Python37\lib\smtplib.py", line 251, in __init__
(code, msg) = self.connect(host, port)
File "C:\Users\1289727\AppData\Local\Programs\Python\Python37\lib\smtplib.py", line 336, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "C:\Users\1289727\AppData\Local\Programs\Python\Python37\lib\smtplib.py", line 307, in _get_socket
self.source_address)
File "C:\Users\1289727\AppData\Local\Programs\Python\Python37\lib\socket.py", line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "C:\Users\1289727\AppData\Local\Programs\Python\Python37\lib\socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11003] getaddrinfo failed
import smtplib
server = smtplib.SMTP('[email protected]', 587)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question