From 9442e2ea30f898812743f4b13a46e458067b3195 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sat, 3 Dec 2011 22:06:49 +0200 Subject: [PATCH] Catch response exceptions in the DATA phase --- ubuntutools/requestsync/mail.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ubuntutools/requestsync/mail.py b/ubuntutools/requestsync/mail.py index 723ee15..769af10 100644 --- a/ubuntutools/requestsync/mail.py +++ b/ubuntutools/requestsync/mail.py @@ -219,6 +219,10 @@ Content-Type: text/plain; charset=UTF-8 '[Enter] to retry. Press [Ctrl-C] to abort now.') else: return + except smtplib.SMTPResponseException, e: + Logger.error('Error while sending: %i, %s', + e.smtp_code, e.smtp_error) + return except smtplib.SMTPServerDisconnected: Logger.error('Server disconnected while sending the mail.') return