Help! SMTPlib

sjoshi at sjoshi at
Tue May 30 05:23:15 CEST 2000

You are right..that's what I have been trying after reading from the
docs...should gave looked at the module first. Anyway will try it the
other way


In article <8gnbip$282$1 at>,
  andrew.henshaw at wrote:
> sjoshi at wrote:
> >Hello
> > I'm trying to use the smtplib for sending mail, and I keep getting
> >error: (10061, 'winsock error') when I try just to connect to the
> >localhost.
> >
> I'm guessing that your code looks something like:
>   import smtplib
>   server=smtplib.SMTP('localhost')
>   server.connect()
> If so, then your problem is that the server.connect() function was
> called when you instantiated "server".   The connection is
automatically made
> when you provide the hostname as a parameter to SMTP.
> I believe that the SMTP example in the library documentation is in
error, in
> this regard.
> Andrew Henshaw

Sent via
Before you buy.

More information about the Python-list mailing list