diff --git a/Lib/smtplib.py b/Lib/smtplib.py index beda161663e..6536371846b 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -224,7 +224,9 @@ def send(self, str): 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: