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 r.david.murray
Recipients DDarko, barry, christian.heimes, r.david.murray
Date 2012-09-23.16:48:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348418921.85.0.174519752325.issue16005@psf.upfronthosting.co.za>
In-reply-to
Content
I believe that Google is technically out of compliance with the SMTP spec here.  What they are doing is not unreasonable, since they don't have any reason to want to waste resources on talking to a server they think is spamming them.

Making this work in a more useful fashion may be considered an enhancement rather than a bug fix, since arguably it is Google, not smtplib, that appears to be violating the RFC.  On the other hand, the fix is simple enough, is unlikely to be harmful, and it can be argued that handling this error is the proper action for a robust smtp client in any case, so I think we can justify making it a bug fix.

The rset is correct in the general case, so the fix would be to wrap it in a try/except and treat SMTPServerDisconnected as not-an-error.

DDarko, would you have any interest in proposing a patch with tests?
History
Date User Action Args
2012-09-23 16:48:41r.david.murraysetrecipients: + r.david.murray, barry, christian.heimes, DDarko
2012-09-23 16:48:41r.david.murraysetmessageid: <1348418921.85.0.174519752325.issue16005@psf.upfronthosting.co.za>
2012-09-23 16:48:41r.david.murraylinkissue16005 messages
2012-09-23 16:48:40r.david.murraycreate