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/email-simple.py | |
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/email-simple.py')
-rw-r--r-- | Doc/includes/email-simple.py | 5 |
1 files changed, 2 insertions, 3 deletions
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() |