smtplib (111, 'Connection refused')

"Martin v. Löwis" martin at v.loewis.de
Fri Sep 17 17:03:36 EDT 2004


Josh Close wrote:
> 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.

OK, so you have an SMTP server on one box but not another. Either
install an SMTP server on another box, or connect to "one box" on
both boxes, instead of connecting to "localhost" on either.

Regards,
Martin



More information about the Python-list mailing list