V
Van_Gogh
Hi,
I am learning how to use the smtplib module, but am having some very
early problems, maybe because I don't understand it.
So, am I correct that by following the example in the Python:
"""To: (e-mail address removed)
From: (e-mail address removed)
Beware the Ides of March.
""")
I should be able to send an email to the recipient, in this case
(e-mail address removed)? When I try to create the server(the line 'server =
smtplib.SMTP('localhost')) I get the following error message:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in -toplevel-
server = smtplib.SMTP('localhost')
File "C:\Python24\lib\smtplib.py", line 241, in __init__
(code, msg) = self.connect(host, port)
File "C:\Python24\lib\smtplib.py", line 304, in connect
(code, msg) = self.getreply()
File "C:\Python24\lib\smtplib.py", line 345, in getreply
line = self.file.readline()
File "C:\Python24\lib\socket.py", line 340, in readline
data = self._sock.recv(self._rbufsize)
error: (10054, 'Connection reset by peer')
Anyone got a pointer as to what I could do?
I am learning how to use the smtplib module, but am having some very
early problems, maybe because I don't understand it.
So, am I correct that by following the example in the Python:
"""To: (e-mail address removed)
From: (e-mail address removed)
Beware the Ides of March.
""")
I should be able to send an email to the recipient, in this case
(e-mail address removed)? When I try to create the server(the line 'server =
smtplib.SMTP('localhost')) I get the following error message:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in -toplevel-
server = smtplib.SMTP('localhost')
File "C:\Python24\lib\smtplib.py", line 241, in __init__
(code, msg) = self.connect(host, port)
File "C:\Python24\lib\smtplib.py", line 304, in connect
(code, msg) = self.getreply()
File "C:\Python24\lib\smtplib.py", line 345, in getreply
line = self.file.readline()
File "C:\Python24\lib\socket.py", line 340, in readline
data = self._sock.recv(self._rbufsize)
error: (10054, 'Connection reset by peer')
Anyone got a pointer as to what I could do?