smtplib help

David A McInnis david at dataovation.com
Mon Nov 26 10:45:48 EST 2001


I do call quit().  Is is possible that the script is moving too fast for the
smpt server to keep up?  If so, how can I slow it down?

David

-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of Paul Brian
Sent: Monday, November 26, 2001 6:55 AM
To: python-list at python.org
Subject: Re: smtplib help


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


--
http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list