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

index e67de61dcfbf0e9e0d97746a3ec137032b4c3714..035442bc3a781a429c10fc44358b652510c66d7b 100644 (file)
@@ -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()
 
index f64df83b4d89e8a4d05fa5c02bb2fb7ab0d14cce..7b1c028fad23143aa2a782365e65f18a48064f0e 100644 (file)
@@ -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.quit()
index 689511e4bb9f8cafcea13ac8808644cfe9a7b456..29bd0782d6204ae01ea73a56cad9d56b3cb63000 100644 (file)
@@ -19,6 +19,6 @@ msg['To'] = you
 
 # Send the message via our own SMTP server, but don't include the
 # envelope header.
-s = smtplib.SMTP()
+s = smtplib.SMTP('localhost')
 s.sendmail(me, [you], msg.as_string())
 s.quit()