[Pythonmac-SIG] problems with smtplib?

Just van Rossum just@letterror.com
Thu, 21 Oct 1999 21:37:25 +0200


At 3:02 PM -0400 10/21/99, chris mann wrote:
>I'm having problems with the smtplib module on Mac.
>
>if I run the following code on windows or linux it works fine, but fails on
>mac:
>import smtplib
>s = smtplib.SMTP('smtp.myhost.com')
>s.helo()
>
>i get the following error:
>Traceback (innermost last):
>  File "<input>", line 1, in ?
>  File "Dev:Scripting:Python 1.5.2c1:Lib:smtplib.py", line 290, in helo
>    name=socket.gethostbyaddr(socket.gethostname())[0]
>error: host not found
>
>any ideas why this is only failing on Mac?

Works for me. Can it be your network setup? Firewall?
Can you see which of the two socket calls fail?

Just