Improves the robustness of the SMTP error handling utilities. Fixes bug #1409. Commit ready for merge.
- Legacy-Id: 7766
This commit is contained in:
parent
e9984b957b
commit
393422b36b
|
@ -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]')
|
||||
|
|
Loading…
Reference in a new issue