how to make smtplib.SMTP('localhost') work on window xp

zxo102 zxo102 at gmail.com
Mon Sep 29 13:21:25 CEST 2008


On 9月29日, 下午2时53分, Lawrence D'Oliveiro <l... at geek-
central.gen.new_zealand> wrote:
> In message
> <56f2097a-5129-4d1a-be82-a73e2874b... at p31g2000prf.googlegroups.com>, zxo102
> wrote:
>
> > SMTPServerDisconnected: Connection unexpectedly closed
>
> Does the SMTP server on localhost mention anything about the connection
> attempt in its log?
>
> If you telnet/netcat to port 25 on localhost, does anything interesting
> happen?

Thanks for your mentioning of the SMTP server on localhost. I did not
install that. After I install a free smtp server downloaded from
http://www.softstack.com/freesmtp.html,
and run the following python script again, everything is fine now.

import smtplib
server = smtplib.SMTP('localhost')
...

Thanks for your message.

ouyang





More information about the Python-list mailing list