Send mail via SMTP inside a space
hello!i’m trying to send a mail with yagmail, but every time i get backFile “/usr/local/lib/python3.10/socket.py”, line 833, in create_connectionsock.connect(sa)OSError: [Errno 101] Network is unreachablethe same simple function is working inside google colab, my pc… only here is not working.maybe there is some firewall block? can someone help me please?thank you
2023-10-12T20:27:01Z
SMTP default port numbers are block, you can try running your service from a different port above 1024
2024-07-21T15:28:46Z
@radamesI also get anOSError: [Errno 101] Network is unreachableI usecontext = ssl.create_default_context()
with smtplib.SMTP_SSL("smtp.gmail.com", 465, context=context) as server:
    server.login(sender_email, email_password)
    server.sendmail(sender_email, receiver_email, text)Which port can I use and how do I have to change the code?
2024-10-14T05:45:11Z
Which port can I use and how do I have to change the code?