код такой:
server = smtplib.SMTP("smtplib.gmail.com", 587)
и вот коды ошибок
File "C:\Users\Admin\Desktop\code.py", line 6, in send_mail
server = smtplib.SMTP("smtplib.gmail.com")
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\smtplib.py", line 255, in __init__
(code, msg) = self.connect(host, port)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\smtplib.py", line 341, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\smtplib.py", line 312, in _get_socket
return socket.create_connection((host, port), timeout,
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\socket.py", line 822, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\socket.py", line 953, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed