I believe that we are able to send email directly to destination MX server such as ('gmail-smtp-in.l.google.com', 25). However I can't connect to the mail server even with socket programming in Python 3.5.1.
import socket
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
sock.connect(('gmail-smtp-in.l.google.com', 25))
Code above always gives me the following error at line 3.
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
I found that people [1] are able to connect to the server stated above, please help me with this issue as I am still clueless about it after hours of research work carried out.
Note that I am running the code on a local computer.
[1]. How to send a mail directly to SMTP server without authentication?