summaryrefslogtreecommitdiff
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-09-01 06:40:07 +0000
committerBarry Warsaw <barry@python.org>2000-09-01 06:40:07 +0000
commite65607c4328fe08b09a06583225fa45d47a79b6e (patch)
tree3710cc704d504be9245c8e1453a49132026f7e86 /Lib/smtplib.py
parentab1e1380529308c1b1521306098ea1001d04d2ae (diff)
downloadcpython-e65607c4328fe08b09a06583225fa45d47a79b6e.tar.gz
Applied patch #101350, closing it.
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index beda161663..6536371846 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -224,7 +224,9 @@ class SMTP:
if self.debuglevel > 0: print 'send:', `str`
if self.sock:
try:
- self.sock.send(str)
+ sendptr = 0
+ while sendptr < len(str):
+ sendptr = sendptr + self.sock.send(str[sendptr:])
except socket.error:
raise SMTPServerDisconnected('Server not connected')
else: