smtplib (111, 'Connection refused')

Josh Close narshe at gmail.com
Fri Sep 17 22:58:10 CEST 2004


import smtplib

mail = smtplib.SMTP('localhost')
mail.send('me','user at domain.tld','message goes here')
mail.quit()

but this fails at the smtplib.SMTP() line on one box, but not on another.

-Josh


On Fri, 17 Sep 2004 16:17:47 -0400, phansen <peter at engcorp.com> wrote:
> Josh Close wrote:
> > I'm using the smtplib module and I keep getting this error: (111,
> > 'Connection refused') What could be causing this? I've tried it from a
> > different computer and it seems to work, but not from this specific
> > server. If port 25 was blocked for some reason, would that give me a
> > 'connection refused' error?
> 
> Please show a snippet of the code you are using, so we can
> see what you are trying to do here.
> 
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list