Fix a typo in bouncing, wrap UnicodeEncodeError in custom exception
This commit is contained in:
parent
e28864074c
commit
b67a2744cd
|
@ -63,7 +63,7 @@ class MailEncryptionProxy:
|
|||
if conf.should_log_headers():
|
||||
LOG.error('Erroneous message headers: %s', self._beginning(envelope))
|
||||
|
||||
return xport.RESULT_ERRORR
|
||||
return xport.RESULT_ERROR
|
||||
|
||||
return xport.RESULT_OK
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ class KeepIntact(MailOperation):
|
|||
"""Return MESSAGE unmodified."""
|
||||
try:
|
||||
return message.as_bytes(policy=SMTPUTF8)
|
||||
except IndexError as e:
|
||||
except (IndexError, UnicodeEncodeError) as e:
|
||||
raise MailSerialisationException(e)
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in New Issue