email questions

Scott Frankel leknarf at pacbell.net
Wed Feb 8 14:39:51 EST 2006


Yes, I was doing something wrong:  I was connecting to the localhost  
after instantiation.  All better now.

Thanks for the tips!
Scott



On Feb 8, 2006, at 11:04 AM, Carsten Haese wrote:

>
> Then you're doing something wrong. The line
>
> s = smtplib.SMTP("mail.ispname.net") instantiates an SMTP instance and
> connects it. Are you doing s.connect() afterwards? If yes, don't do
> that, it'll try to connect to the local host, which is not an smtp
> server.
>
> If you want to separate instantiation and connection, do this:
>
> s = smtplib.SMTP()
> s.connect("mail.ispname.net")
>
> -Carsten
>
>




More information about the Python-list mailing list