diff options
-rwxr-xr-x | Lib/smtplib.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py index beda161..6536371 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: |