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.
Created on 2011年04月19日 20:59 by sandro.tosi, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| smtp_connect-2.7.patch | sandro.tosi, 2011年04月19日 20:59 | |||
| smtp_connect-3.2.patch | sandro.tosi, 2011年04月19日 21:00 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg134100 - (view) | Author: Sandro Tosi (sandro.tosi) * (Python committer) | Date: 2011年04月19日 20:59 | |
Hi, following up http://mail.python.org/pipermail/docs/2011-April/003742.html here are a couple of patches to call connect() after smtplib.SMTP() and sendmail(). Patches are: 2.7: to be applied in 2.7 and merged into 3.1 3.2: to be applied in 3.2 and merged into default That's because in 3.2 we have a change in the example to use send_message() instead of sendmail() (in order to allow binary contents), and so there's also a small fix to actually make use of send_message() email-simple. |
|||
| msg134631 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年04月28日 00:12 | |
I’d remove the "Connect to the SMTP server" comment before "s.connect()". It’s redundant, contrary to the other comment (which no doubt prompted you to add a comment too) "Send the message via local SMTP server" which helpfully introduces the next lines of code. |
|||
| msg134885 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年04月30日 21:21 | |
New changeset 5c61c1d583fd by R David Murray in branch '3.2': #11883: replace incorrect call to sendmail with correct call to send_message http://hg.python.org/cpython/rev/5c61c1d583fd New changeset fcfaeab42f6e by R David Murray in branch 'default': Merge #11883: replace incorrect call to sendmail with correct call to send_message http://hg.python.org/cpython/rev/fcfaeab42f6e |
|||
| msg134886 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年04月30日 21:29 | |
New changeset a9cb47d0241e by R David Murray in branch '2.7': #11883: fix email examples by adding 'localhost' to SMTP constructor calls http://hg.python.org/cpython/rev/a9cb47d0241e New changeset 00ff8825f551 by R David Murray in branch '3.1': #11883: fix email examples by adding 'localhost' to SMTP constructor calls http://hg.python.org/cpython/rev/00ff8825f551 New changeset 0f14dd4e644e by R David Murray in branch '3.2': Merge #11883: fix email examples by adding 'localhost' to SMTP constructor calls http://hg.python.org/cpython/rev/0f14dd4e644e New changeset cfc02e132c12 by R David Murray in branch 'default': Merge #11883: fix email examples by adding 'localhost' to SMTP constructor calls http://hg.python.org/cpython/rev/cfc02e132c12 |
|||
| msg134887 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2011年04月30日 21:31 | |
The call to connect() is not required in the first example, since the hostname is passed to the constructor in that case. Since these examples are about the email package rather than smtplib, I preferred to change the other examples to pass localhost to the constructor as well, rather than call connect with no arguments after a no argument call to the constructor. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:16 | admin | set | github: 56092 |
| 2012年01月02日 22:54:07 | sandro.tosi | link | issue8245 superseder |
| 2011年04月30日 21:31:28 | r.david.murray | set | status: open -> closed type: behavior messages: + msg134887 resolution: fixed stage: patch review -> resolved |
| 2011年04月30日 21:29:39 | python-dev | set | messages: + msg134886 |
| 2011年04月30日 21:21:03 | python-dev | set | nosy:
+ python-dev messages: + msg134885 |
| 2011年04月28日 00:12:47 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg134631 |
| 2011年04月19日 21:00:43 | sandro.tosi | set | files: + smtp_connect-3.2.patch |
| 2011年04月19日 20:59:21 | sandro.tosi | create | |