Python Forum

Full Version: TimeOutError when trying to initiate smtplib.SMTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I am try to make SMTP connection to a host received by MX query of its domain. But when I do
smtplib.SMTP('aspmx.l.google.com')
or even
smtplib.SMTP_SSL('aspmx.l.google.com')
, it raises following TimeOutError.

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 am trying hard to figure out what could go wrong. I have even tried doing this on my cloud VPS instances but its still the same.