From 393422b36bbfc623e58c419f9d95668e2b360097 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Thu, 22 May 2014 01:28:33 +0000 Subject: [PATCH] Improves the robustness of the SMTP error handling utilities. Fixes bug #1409. Commit ready for merge. - Legacy-Id: 7766 --- ietf/utils/mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/utils/mail.py b/ietf/utils/mail.py index 62dad0c06..c81d3f9a6 100644 --- a/ietf/utils/mail.py +++ b/ietf/utils/mail.py @@ -306,7 +306,7 @@ def smtp_error_user_warning(thing,request): if request: warning = "An error occured while sending email:\n" - if (e.original_msg): + if getattr(e,'original_msg',None): warning += "Subject: %s\n" % e.original_msg.get('Subject','[no subject]') warning += "To: %s\n" % e.original_msg.get('To','[no to]') warning += "Cc: %s\n" % e.original_msg.get('Cc','[no cc]')