smtplib help

Kragen Sitaker kragen at canonical.org
Mon Nov 26 20:38:15 CET 2001


"David A McInnis" <david at dataovation.com> writes:
> Any ideas why smtplib would crash on me after about sending 150 email msgs
> (i did not count, but that is a good estimate)?
>   File "C:\Python21\lib\smtplib.py", line 222, in connect
>     self.sock.connect((host, port))
>   File "<string>", line 1, in connect
> error: (10048, 'Address already in use')

That's EADDRINUSE, which generally happens when you're trying to bind
to a port that's already bound.  It sounds like your client machine is
giving you only a very small number of ephemeral ports (about 150!? 
there should be tens of thousands).  Have you tried running the code
on an operating system that doesn't suck?




More information about the Python-list mailing list