Hi All,
I am a total newbe to python. I am using some already available code to send email from commandline using my Gmail account.
For the piece of code
smtp = smtplib.SMTP('smtp.gmail.com', 587)
I get a error
################
Traceback (most recent call last):
File "Mail.py", line 44, in <module>
smtp.connect('smtp.gmail.com', 587)
File "e:\Python30\lib\smtplib.py", line 295, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "e:\Python30\lib\smtplib.py", line 273, in _get_socket
return socket.create_connection((host, port), timeout)
File "E:\Python30\lib\socket.py", line 303, in create_connection
raise error(msg)
socket.error: [Errno 10060] A connection attempt failed because the connected pa
rty did not properly respond after a period of time, or established connection f
ailed because connected host has failed to respond
###########
The same code work fine when I running the script from Home. When I try from my office, I get the problem. If I replace the smtp server with my office smtp server (with port 25), I have no problem.
Also I checked that the port is open (Using netstat) and moreover I dont have a FireWall enabled.
Please help me debug.