[Python-checkins] cpython (merge 3.1 -> 3.2): Merge #11883: fix email examples by adding 'localhost' to SMTP constructor calls
r.david.murray
python-checkins at python.org
Sat Apr 30 23:29:40 CEST 2011
http://hg.python.org/cpython/rev/0f14dd4e644e
changeset: 69729:0f14dd4e644e
branch: 3.2
parent: 69725:5c61c1d583fd
parent: 69728:00ff8825f551
user: R David Murray <rdmurray at bitdance.com>
date: Sat Apr 30 17:29:08 2011 -0400
summary:
Merge #11883: fix email examples by adding 'localhost' to SMTP constructor calls
files:
Doc/includes/email-dir.py | 2 +-
Doc/includes/email-mime.py | 2 +-
Doc/includes/email-simple.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Doc/includes/email-dir.py b/Doc/includes/email-dir.py
--- a/Doc/includes/email-dir.py
+++ b/Doc/includes/email-dir.py
@@ -105,7 +105,7 @@
fp.write(composed)
fp.close()
else:
- s = smtplib.SMTP()
+ s = smtplib.SMTP('localhost')
s.sendmail(opts.sender, opts.recipients, composed)
s.quit()
diff --git a/Doc/includes/email-mime.py b/Doc/includes/email-mime.py
--- a/Doc/includes/email-mime.py
+++ b/Doc/includes/email-mime.py
@@ -26,6 +26,6 @@
msg.attach(img)
# Send the email via our own SMTP server.
-s = smtplib.SMTP()
+s = smtplib.SMTP('localhost')
s.send_message(msg)
s.quit()
diff --git a/Doc/includes/email-simple.py b/Doc/includes/email-simple.py
--- a/Doc/includes/email-simple.py
+++ b/Doc/includes/email-simple.py
@@ -18,6 +18,6 @@
msg['To'] = you
# Send the message via our own SMTP server.
-s = smtplib.SMTP()
+s = smtplib.SMTP('localhost')
s.send_message(msg)
s.quit()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list