summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/lib/libsmtplib.tex9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/lib/libsmtplib.tex b/Doc/lib/libsmtplib.tex
index bc69387d..4a7b2df 100644
--- a/Doc/lib/libsmtplib.tex
+++ b/Doc/lib/libsmtplib.tex
@@ -241,17 +241,20 @@ import smtplib
import string
def prompt(prompt):
- return string.strip(raw_input(prompt))
+ return raw_input(prompt).strip()
fromaddr = prompt("From: ")
-toaddrs = string.split(prompt("To: "))
+toaddrs = prompt("To: ").split()
print "Enter message, end with ^D:"
# Add the From: and To: headers at the start!
msg = ("From: %s\r\nTo: %s\r\n\r\n"
% (fromaddr, string.join(toaddrs, ", ")))
while 1:
- line = raw_input()
+ try:
+ line = raw_input()
+ except EOFError:
+ break
if not line:
break
msg = msg + line