mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
#10321: Add support for sending binary DATA and Message objects to smtplib
This commit is contained in:
parent
a563392f92
commit
7dff9e08fb
7 changed files with 202 additions and 13 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue