-
Committer:
James Henstridge
-
Date:
2007-10-09 10:45:48 UTC
-
mto:
This revision was merged to the branch mainline in
revision
2925.
-
Revision ID:
james@jamesh.id.au-20071009104548-ygqxbh7322f1jfem
Update SMTPConnection._create_connection to better follow the SMTP
specification (and hence work with fussy servers):
* Call ehlo/helo ourselves instead of relying on login() or sendmail()
calling them implicitly.
* Only call starttls if the previous ehlo response indicates that the
server supports the extension. If starttls fails, raise SMTPError.
* If we call starttls, follow it with another ehlo to discover any
newly revealed extensions (e.g. auth).
Also add some tests for _create_connection().