Kaydet (Commit) dd6ab853 authored tarafından R David Murray's avatar R David Murray

#11883: fix email examples by adding 'localhost' to SMTP constructor calls

üst dcaacbf1
...@@ -105,7 +105,7 @@ must be running an SMTP server. ...@@ -105,7 +105,7 @@ must be running an SMTP server.
fp.write(composed) fp.write(composed)
fp.close() fp.close()
else: else:
s = smtplib.SMTP() s = smtplib.SMTP('localhost')
s.sendmail(opts.sender, opts.recipients, composed) s.sendmail(opts.sender, opts.recipients, composed)
s.quit() s.quit()
......
...@@ -26,6 +26,6 @@ for file in pngfiles: ...@@ -26,6 +26,6 @@ for file in pngfiles:
msg.attach(img) msg.attach(img)
# Send the email via our own SMTP server. # Send the email via our own SMTP server.
s = smtplib.SMTP() s = smtplib.SMTP('localhost')
s.sendmail(me, family, msg.as_string()) s.sendmail(me, family, msg.as_string())
s.quit() s.quit()
...@@ -19,6 +19,6 @@ msg['To'] = you ...@@ -19,6 +19,6 @@ msg['To'] = you
# Send the message via our own SMTP server, but don't include the # Send the message via our own SMTP server, but don't include the
# envelope header. # envelope header.
s = smtplib.SMTP() s = smtplib.SMTP('localhost')
s.sendmail(me, [you], msg.as_string()) s.sendmail(me, [you], msg.as_string())
s.quit() s.quit()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment