smtplib error('Connection reset by peer')

Tim Roberts timr at probo.com
Sun Jan 8 03:53:36 EST 2006


"Van_Gogh" <Terji78 at gmail.com> wrote:
>
>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('soothsayer at example.org', 'jcaesar at example.org',
>"""To: jcaesar at example.org
>From: soothsayer at example.org
>
>Beware the Ides of March.
>""")
>>>> server.quit()
>
>I should be able to send an email to the recipient, in this case
>jcaesar at example.org? When I try to create the server(the line 'server =
>smtplib.SMTP('localhost')) I get the following error message:
>...
>error: (10054, 'Connection reset by peer')
>
>Anyone got a pointer as to what I could do?

Replace "localhost" with the name of your usual outgoing mail server.

Although there ARE SMTP servers available for Windows XP, is it virtually
certain that you aren't running one.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list