diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-11-08 17:15:13 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-11-08 17:15:13 (GMT) |
commit | 7dff9e08fbfb371b90431e5cbf380c4ea5d228f7 (patch) | |
tree | 417cf2edad370f4aa9bdb4215a80f5e79ec8c27f /Doc/includes | |
parent | a563392f92558d2c288f18924af38a1a9c58fad3 (diff) | |
download | cpython-7dff9e08fbfb371b90431e5cbf380c4ea5d228f7.zip cpython-7dff9e08fbfb371b90431e5cbf380c4ea5d228f7.tar.gz cpython-7dff9e08fbfb371b90431e5cbf380c4ea5d228f7.tar.bz2 |
#10321: Add support for sending binary DATA and Message objects to smtplib
Diffstat (limited to 'Doc/includes')
-rw-r--r-- | Doc/includes/email-mime.py | 2 | ||||
-rw-r--r-- | Doc/includes/email-simple.py | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Doc/includes/email-mime.py b/Doc/includes/email-mime.py index f64df83..8ddd486 100644 --- a/Doc/includes/email-mime.py +++ b/Doc/includes/email-mime.py @@ -27,5 +27,5 @@ for file in pngfiles: # Send the email via our own SMTP server. s = smtplib.SMTP() -s.sendmail(me, family, msg.as_string()) +s.sendmail(msg) s.quit() diff --git a/Doc/includes/email-simple.py b/Doc/includes/email-simple.py index 689511e..b069ab0 100644 --- a/Doc/includes/email-simple.py +++ b/Doc/includes/email-simple.py @@ -17,8 +17,7 @@ msg['Subject'] = 'The contents of %s' % textfile msg['From'] = me msg['To'] = you -# Send the message via our own SMTP server, but don't include the -# envelope header. +# Send the message via our own SMTP server. s = smtplib.SMTP() -s.sendmail(me, [you], msg.as_string()) +s.sendmail(msg) s.quit() |