smtplib help

Paul Brian paul1brian at yahoo.com
Mon Nov 26 09:55:16 EST 2001


David,

its hard to comment, but I suspect that the error you are getting comes from
the SMTP server.

Basically line 222 in smtplib calls on the socket module, which has an error
code:
errorTab[10048] = "The network address is in use." (line 79)
(I am using 2.1.1 - Your version presumably has a different error msg )

So I suspect that the server is keeping alive sessions - I would check by
quiting the session each time (xxx.quit()) you send a message.

Hope that helps

David A McInnis <david at dataovation.com> wrote in message
news:mailman.1006768891.31431.python-list at python.org...
Any ideas why smtplib would crash on me after about sending 150 email msgs
(i did not count, but that is a good estimate)?

This is the error that I am getting.

  File "C:\Python21\mm_mime.py", line 93, in Send
    server = smtplib.SMTP(host)
  File "C:\Python21\lib\smtplib.py", line 187, in __init__
    (code, msg) = self.connect(host, port)
  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')

David McInnis





More information about the Python-list mailing list