summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index cb15de2..f024bff 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -290,9 +290,7 @@ class SMTP:
if self.debuglevel > 0: print 'send:', `str`
if self.sock:
try:
- sendptr = 0
- while sendptr < len(str):
- sendptr = sendptr + self.sock.send(str[sendptr:])
+ self.sock.sendall(str)
except socket.error:
self.close()
raise SMTPServerDisconnected('Server not connected')