The problem is almost certainly the simple fact that the machine you *used* to run on was also running an SMTP server (typically sendmail), whereas the Solaris box apparently isn't.I've good luck with this on a Linux system (foolproof), and now I'm trying to get the same thing to run on a Solaris box. pythonpath, or env or..?
Any help much appreciated. Thanks
Chuck
Python 2.3.2 (#1, Oct 17 2003, 19:06:15) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information.
import smtplib
host="localhost" server = smtplib.SMTP(host)
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.3/smtplib.py", line 240, in __init__ (code, msg) = self.connect(host, port) File "/usr/local/lib/python2.3/smtplib.py", line 302, in connect raise socket.error, msg socket.error: (146, 'Connection refused')
If the two machines are on the same network, try replacing "localhost" with the name, or IP address, of the machine that *did* work.
Otherwise, ask your sysadmin which host you should use as an SMTP server.
regards Steve -- Steve Holden +1 703 861 4237 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/
-- http://mail.python.org/mailman/listinfo/python-list