[issue16005] smtplib.SMTP().sendmail() and rset()

2014-07-26 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - duplicate stage: - resolved status: open - closed superseder: - error responses from server are masked in smtplib when server closes connection ___ Python tracker

[issue16005] smtplib.SMTP().sendmail() and rset()

2014-07-23 Thread Milan Oberkirch
Milan Oberkirch added the comment: This bug is fixed (at least in 3.5) so you might want to close it. (See the _rset function in smtplib.py:482 and how its used in sendmail.) -- nosy: +jesstess, zvyn ___ Python tracker rep...@bugs.python.org

[issue16005] smtplib.SMTP().sendmail() and rset()

2012-09-24 Thread DDarko
DDarko added the comment: I understand, in that case: /cpython/file/default/Lib/smtplib.py 760c760,761 self.rset() --- try: self.rset() except: pass Solves the problem. -- ___ Python tracker

[issue16005] smtplib.SMTP().sendmail() and rset()

2012-09-24 Thread R. David Murray
R. David Murray added the comment: Well, a bare except is almost always a bad idea, and certainly is in this case. I'll create a patch for this if no one beats me to it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16005

[issue16005] smtplib.SMTP().sendmail() and rset()

2012-09-23 Thread DDarko
New submission from DDarko: I'm trying to send an email as follows: smtp = smtplib.SMTP(host, port=25) smtp.ehlo() smtp.sendmail(from_mail, to_mail, data) The last line / command calls the raise. I would like to know the reason why SMTP did not accept my email? In theory, enough to capture the

[issue16005] smtplib.SMTP().sendmail() and rset()

2012-09-23 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- components: +email -Library (Lib) nosy: +barry, r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16005 ___

[issue16005] smtplib.SMTP().sendmail() and rset()

2012-09-23 Thread Christian Heimes
Christian Heimes added the comment: According to RFC 821 a smtp server must always apply with OK when it receives a RSET command. RESET (RSET) This command specifies that the current mail transaction is to be aborted. Any stored sender, recipients, and mail data must be

[issue16005] smtplib.SMTP().sendmail() and rset()

2012-09-23 Thread DDarko
DDarko added the comment: The problem is that this is not my SMTP server. I want to connect as a client with smtplib. For this, as I said earlier it is mx.google.com send: 'ehlo [127.0.1.1]\r\n' reply: b'250-mx.google.com at your service, [MYIP]\r\n' reply: b'250-SIZE 35882577\r\n' reply:

[issue16005] smtplib.SMTP().sendmail() and rset()

2012-09-23 Thread R. David Murray
R. David Murray added the comment: 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

[issue16005] smtplib.SMTP().sendmail() and rset()

2012-09-23 Thread DDarko
DDarko added the comment: I do not understand why at all reset is performed ? If moments later raise is done. If someone despite error SMTPSenderRefused, SMTPRecipientsRefused or SMTPDataError will still want to maintain a connection and use other data with session is likely he will call

[issue16005] smtplib.SMTP().sendmail() and rset()

2012-09-23 Thread R. David Murray
R. David Murray added the comment: The rset just returns the connection to the base state, allowing a new message sending transaction to start from a known state. In any case, since the library has done this in the past, it must continue to do this in the future, or it will break currently