diff --git a/ChangeLog b/ChangeLog index f592aa22c..2ca70a07e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-09-06 Wolfgang Sourdeau + + * OpenChange/MAPIStoreMailVolatileMessage.m + (FillMessageHeadersFromProperties): build a recipient list for the + "from" field from the list stored in the value for "orig" in the + recipients dict. + 2012-09-05 Wolfgang Sourdeau * OpenChange/MAPIStoreMailMessage.m (-getMessageData:inMemCtx:): diff --git a/OpenChange/MAPIStoreMailVolatileMessage.m b/OpenChange/MAPIStoreMailVolatileMessage.m index fa12130cf..e08bd5a7e 100644 --- a/OpenChange/MAPIStoreMailVolatileMessage.m +++ b/OpenChange/MAPIStoreMailVolatileMessage.m @@ -540,7 +540,7 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers, NSArray *list; NSCalendarDate *date; NSDictionary *recipients; - NSUInteger count; + NSUInteger type; SOGoUser *activeUser; activeUser @@ -555,12 +555,16 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers, recipients = [mailProperties objectForKey: @"recipients"]; if (recipients) { - for (count = 1; count < 3; count++) + for (type = MAPI_TO; type <= MAPI_BCC; type++) { - recId = recTypes[count]; + recId = recTypes[type]; list = MakeRecipientsList ([recipients objectForKey: recId]); [headers setObjects: list forKey: recId]; } + + list = MakeRecipientsList ([recipients objectForKey: @"orig"]); + if (list) + [headers setObjects: list forKey: @"from"]; } else NSLog (@"message without recipients");