Merge pull request #99 from Zentyal/ejhernandez/corner-cases-import-PST
oc-mail: Set sender on email messages without an orig recipientpull/65/head
commit
307fe90854
1
NEWS
1
NEWS
|
@ -8,6 +8,7 @@ Enhancements
|
|||
- Appointment color and importance work now between Outlooks
|
||||
|
||||
Bug fixes
|
||||
- Fix sender on importing email messages like event invitations
|
||||
- Fix Outlook crashes when modifying the view of a folder
|
||||
- Fix server side crash when reading some recurrence appointments
|
||||
|
||||
|
|
|
@ -610,6 +610,7 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers,
|
|||
NSDictionary *mailProperties, BOOL withBcc,
|
||||
struct mapistore_connection_info *connInfo)
|
||||
{
|
||||
BOOL fromResolved = NO;
|
||||
NSData *senderEntryId;
|
||||
NSMutableString *subject;
|
||||
NSString *from, *recId, *messageId, *subjectData, *recipientsStr, *msgClass;
|
||||
|
@ -646,13 +647,15 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers,
|
|||
|
||||
list = MakeRecipientsList ([recipients objectForKey: @"orig"]);
|
||||
if ([list count])
|
||||
[headers setObjects: list forKey: @"from"];
|
||||
{
|
||||
[headers setObjects: list forKey: @"from"];
|
||||
fromResolved = YES;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (!fromResolved)
|
||||
{
|
||||
NSLog (@"Message without recipients."
|
||||
@"Guessing recipients from PidTagSenderEntryId, PidTagOriginalDisplayTo"
|
||||
@"and PidTagOriginalCc");
|
||||
NSLog (@"Message without an orig from, try to guess it from PidTagSenderEntryId");
|
||||
senderEntryId = [mailProperties objectForKey: MAPIPropertyKey (PR_SENDER_ENTRYID)];
|
||||
if (senderEntryId)
|
||||
{
|
||||
|
@ -712,7 +715,12 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers,
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!recipients)
|
||||
{
|
||||
NSLog (@"Message without recipients."
|
||||
@"Guessing recipients from PidTagOriginalDisplayTo and PidTagOriginalCc");
|
||||
recipientsStr = [mailProperties objectForKey: MAPIPropertyKey (PidTagOriginalDisplayTo)];
|
||||
if (recipientsStr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue