Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 361a7df

Browse files
committed
Merge #11883: fix email examples by adding 'localhost' to SMTP constructor calls
2 parents 7461298 + bb754b5 commit 361a7df

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/includes/email-dir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def main():
105105
fp.write(composed)
106106
fp.close()
107107
else:
108-
s = smtplib.SMTP()
108+
s = smtplib.SMTP('localhost')
109109
s.sendmail(opts.sender, opts.recipients, composed)
110110
s.quit()
111111

Doc/includes/email-mime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
msg.attach(img)
2727

2828
# Send the email via our own SMTP server.
29-
s = smtplib.SMTP()
29+
s = smtplib.SMTP('localhost')
3030
s.send_message(msg)
3131
s.quit()

Doc/includes/email-simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
msg['To'] = you
1919

2020
# Send the message via our own SMTP server.
21-
s = smtplib.SMTP()
21+
s = smtplib.SMTP('localhost')
2222
s.send_message(msg)
2323
s.quit()

0 commit comments

Comments
 (0)