]> granicus.if.org Git - python/commitdiff
Merge #11883: fix email examples by adding 'localhost' to SMTP constructor calls
authorR David Murray <rdmurray@bitdance.com>
Sat, 30 Apr 2011 21:29:08 +0000 (17:29 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 30 Apr 2011 21:29:08 +0000 (17:29 -0400)
1  2 
Doc/includes/email-dir.py
Doc/includes/email-mime.py
Doc/includes/email-simple.py

Simple merge
index ec7e371d00d607ee0e2534a844c568939065bb86,7b1c028fad23143aa2a782365e65f18a48064f0e..a90edc1373726ad6faa2397c1a475aa145f2da2b
@@@ -26,6 -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.sendmail(me, family, msg.as_string())
 +s.send_message(msg)
  s.quit()
index fdf6f8292432dba1d6a34510a889c924bf138787,29bd0782d6204ae01ea73a56cad9d56b3cb63000..077568d563be89530ed1666cc40cda4929abd6fa
@@@ -17,7 -17,8 +17,7 @@@ msg['Subject'] = 'The contents of %s' 
  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 = smtplib.SMTP('localhost')
 -s.sendmail(me, [you], msg.as_string())
 +s.send_message(msg)
  s.quit()