1
0
Fork 0

Store 'Delivered-To' as 'to_header' when 'to' is unspecified.

This commit is contained in:
Adam Coddington 2014-11-10 19:20:17 -08:00
parent df4c7196db
commit e1b0763a46

View file

@ -320,6 +320,8 @@ class Mailbox(models.Model):
msg.from_header = convert_header_to_unicode(message['from'])
if 'to' in message:
msg.to_header = convert_header_to_unicode(message['to'])
elif 'Delivered-To' in message:
msg.to_header = convert_header_to_unicode(message['Delivered-To'])
msg.save()
message = self._get_dehydrated_message(message, msg)
msg.set_body(message.as_string())