From c82b4c37ac22b72e1fda6847cffca048160ca100 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Mon, 11 Sep 2000 21:20:28 +0000 Subject: send(): Apply patch from Python 2.0b1 which fixes the problem with partial socket writes. This should fix bug #101475. --- Mailman/pythonlib/smtplib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Mailman/pythonlib/smtplib.py') diff --git a/Mailman/pythonlib/smtplib.py b/Mailman/pythonlib/smtplib.py index f898a2fe1..4f6a00d3b 100755 --- a/Mailman/pythonlib/smtplib.py +++ b/Mailman/pythonlib/smtplib.py @@ -241,7 +241,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: -- cgit v1.2.3-70-g09d2