smtplib error('Connection reset by peer')

2006-01-04 Thread 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:

>>> import smtplib
>>> server = smtplib.SMTP('localhost')
>>> server.sendmail('[EMAIL PROTECTED]', '[EMAIL PROTECTED]',
"""To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]

Beware the Ides of March.
""")
>>> server.quit()

I should be able to send an email to the recipient, in this case
[EMAIL PROTECTED] 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 "", 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?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: smtplib error('Connection reset by peer')

2006-01-04 Thread Van_Gogh
I should mention that I'm on Windows XP.

-- 
http://mail.python.org/mailman/listinfo/python-list