mail client in python, help | Sololearn: Learn to code for FREE!


mail client in python, help

hello, I am trying to create a mail client with python, but when I run my code I get the following error: connecting to port 10000 the connection has faild! :( Traceback (most recent call last): File "", line 13, in <module> sock.sendall(message) File "/usr/lib/python2.7/", line 224, in meth return getattr(self._sock,name)(*args) socket.timeout: timed out ++++++++++++++++++++++++++++++++++++++ THAT PART OF THE CODE: import socket import sys sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(10) try: server_address = ('', 10000) print >> sys.stderr, 'connecting to %s port %s'% server_address sock.connect (server_address) except: print ('the connection has faild! :(') #1 message = 'helo' sock.sendall(message) data = sock.recv(100) print >> sys.stderr, 'c: helo' print >> sys.stderr, data

11/18/2017 11:18:33 AM

Dariyoush Shiri

5 Answers

New Answer


The module doesn't work properly here


what should I do then?


I solved the problem Thank you anyway :)


Run this code on IDLE or PyCharm.