Title: smtplib.SMTP.sendmail() rejected after quit(),connect() sequence, no HELO
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
Status: closed Resolution: duplicate
Dependencies: Superseder: smtplib doesn't clear helo/ehlo flags on quit
View: 4142
Assigned To: Nosy List: cmcginty
Priority: normal Keywords:

Created on 2009-07-30 20:18 by cmcginty, last changed 2009-08-05 20:58 by amaury.forgeotdarc. This issue is now closed.

Messages (2)
msg91107 - (view) Author: Casey McGinty (cmcginty) Date: 2009-07-30 20:18
The smtplib.SMTP.quit() method does not reset the 'helo_resp' and
'ehlo_resp' instance attributes. During the next
smtplib.SMTP.sendmail(), the HELO/EHLO commands are not sent, and may
cause the remote SMTP service to reject the message, due to improper
protocol handshaking.

To fix, self.helo_resp and self.ehlo_resp should be set to 'None' in the
smtplib.SMTP.quit() method.
msg91108 - (view) Author: Casey McGinty (cmcginty) Date: 2009-07-30 20:21
Sorry, duplicate of #4142
Date User Action Args
2009-08-05 20:58:40amaury.forgeotdarcsetstatus: open -> closed
resolution: duplicate
superseder: smtplib doesn't clear helo/ehlo flags on quit
2009-07-30 20:21:10cmcgintysettype: behavior
messages: + msg91108
2009-07-30 20:18:01cmcgintycreate