Skip to content

Commit 393422b

Browse files
committed
Improves the robustness of the SMTP error handling utilities. Fixes bug ietf-tools#1409. Commit ready for merge.
- Legacy-Id: 7766
1 parent e9984b9 commit 393422b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/utils/mail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def smtp_error_user_warning(thing,request):
306306

307307
if request:
308308
warning = "An error occured while sending email:\n"
309-
if (e.original_msg):
309+
if getattr(e,'original_msg',None):
310310
warning += "Subject: %s\n" % e.original_msg.get('Subject','[no subject]')
311311
warning += "To: %s\n" % e.original_msg.get('To','[no to]')
312312
warning += "Cc: %s\n" % e.original_msg.get('Cc','[no cc]')

0 commit comments

Comments
 (0)