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

+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

11/18/2017 11:18:33 AM

Dariyoush Shiri

5 Answers

New Answer

+3

The module doesn't work properly here

+2

what should I do then?

+2

I solved the problem Thank you anyway :)

+1

Run this code on IDLE or PyCharm.

+1