This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients Felix Schwarz, dwig, loewis
Date 2009-02-15.18:46:28
SpamBayes Score 7.0822854e-05
Marked as misclassified No
Message-id <1234723590.11.0.31572001382.issue4142@psf.upfronthosting.co.za>
In-reply-to
Content
IIUC, the bug only occurs if you use the same SMTP object for multiple
connections. I would claim that this is a bug in the application: SMTP
objects are not designed to be used for multiple connections. You need
to create a new one for each connection.

If you want to extend the SMTP class to work for multiple connections,
the provided patch is incorrect. Resetting the attributes should not be
done in .connect() (i.e. for the new connection), but in .close() (i.e.
when shutting down the previous connection). Furthermore, it should not
only reset the two response attributes, but all per-connection
attributes (which includes e.g. esmtp_features), and a test should be
provided that, after close, only known "good" attributes remain set on
the object (e.g. debuglevel).
History
Date User Action Args
2009-02-15 18:46:30loewissetrecipients: + loewis, Felix Schwarz, dwig
2009-02-15 18:46:30loewissetmessageid: <1234723590.11.0.31572001382.issue4142@psf.upfronthosting.co.za>
2009-02-15 18:46:28loewislinkissue4142 messages
2009-02-15 18:46:28loewiscreate