mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
Merge #11883: fix email examples by adding 'localhost' to SMTP constructor calls
This commit is contained in:
commit
361a7df323
3 changed files with 3 additions and 3 deletions
|
|
@ -105,7 +105,7 @@ must be running an SMTP server.
|
|||
fp.write(composed)
|
||||
fp.close()
|
||||
else:
|
||||
s = smtplib.SMTP()
|
||||
s = smtplib.SMTP('localhost')
|
||||
s.sendmail(opts.sender, opts.recipients, composed)
|
||||
s.quit()
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ for file in pngfiles:
|
|||
msg.attach(img)
|
||||
|
||||
# Send the email via our own SMTP server.
|
||||
s = smtplib.SMTP()
|
||||
s = smtplib.SMTP('localhost')
|
||||
s.send_message(msg)
|
||||
s.quit()
|
||||
|
|
|
|||
|
|
@ -18,6 +18,6 @@ msg['From'] = me
|
|||
msg['To'] = you
|
||||
|
||||
# Send the message via our own SMTP server.
|
||||
s = smtplib.SMTP()
|
||||
s = smtplib.SMTP('localhost')
|
||||
s.send_message(msg)
|
||||
s.quit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue