+ 2

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 mail.uni-wuppertal.de port 10000 the connection has faild! :( Traceback (most recent call last): File "ClientMail.py", line 13, in <module> sock.sendall(message) File "/usr/lib/python2.7/socket.py", 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 = ('mail.uni-wuppertal.de', 10000) print >> sys.stderr, 'connecting to %s port %s'% server_address sock.connect (server_address) except: print ('the connection has faild! :(') #1 message = 'helo mail.uni-wuppertal.de' sock.sendall(message) data = sock.recv(100) print >> sys.stderr, 'c: helo mail.uni-wuppertal.de' print >> sys.stderr, data

18th Nov 2017, 11:18 AM
Dariush Shiri
Dariush Shiri - avatar
5 Respostas
+ 3
The module doesn't work properly here
18th Nov 2017, 11:30 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
what should I do then?
18th Nov 2017, 11:35 AM
Dariush Shiri
Dariush Shiri - avatar
+ 2
I solved the problem Thank you anyway :)
18th Nov 2017, 1:28 PM
Dariush Shiri
Dariush Shiri - avatar
+ 1
Run this code on IDLE or PyCharm.
18th Nov 2017, 1:28 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
Anyways NP
18th Nov 2017, 1:29 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar